Loading ...
Sorry, an error occurred while loading the content.
 

Re: [Clip] ^!If Bug ?

Expand Messages
  • John Mitchell
    Alan Did you try the code? What happened on your system? The fragment I submitted demonstrates a bug (I think). It s not intended to make sense. I m hoping
    Message 1 of 21 , Jan 5, 2005
      Alan

      Did you try the code? What happened on your system?

      The fragment I submitted demonstrates a bug (I think). It's not intended
      to make sense. I'm hoping someone can try executing it and then confirm
      or deny the bug or else explain why it doesn't work as expected.

      Regards, John M

      ----- Original message -----
      From: "Alan_C" <acumming@...>
      To: ntb-clips@yahoogroups.com
      Date: Wed, 05 Jan 2005 20:35:42 -0800
      Subject: Re: [Clip] ^!If Bug ?


      John Mitchell wrote:
      > Unless this is only happening to me, then it looks like a bug.
      >
      > ; Start of clip -------
      > ^!Set %comment%=">>"
      > ^!Select paragraph
      > ^!Set %Str%=^$StrCopyLeft(^$GetSelection$;2)$
      > ^!If ^%Str%=^%comment% ^!Prompt ^%Str%=^%comment%
      > ^!If ^%comment%=^%Str% ^!Prompt ^%comment%=^%Str%
      > ; End of clip -------
      >
      > If I run it against an open document containing arbitrary text the first
      > ^!If tests TRUE and the second tests FALSE, except when the first two
      > characters of the current paragraph are >>, in which case both tests
      > resolve to FALSE!!

      But why test the same thing twice? (their order is irrelevant.
      checking the two items for a match or not is what you are doing)

      If task at hand be whether or not strings match (rather than working
      with digits) then I tend to use IfSame rather then If but that might be
      my personal preference. (some languages treat digits different than
      alpha text. essentially with alpha text, either you have a match or you
      don't. but with digits, can have a less than, equals, greater than or
      even: =>
      (equal to or greater than) such as: ^!If ^%amount% => 7 Skip

      ^!IfSame "^%Str%" "^%comment%"

      ^!IfDiff "^%Str%" "^%comment%" Skip
      ^!Prompt Str and comment match
      ;----------

      Is there an IfDiff? I'm on Linux right now practicing Perl. Tomorrow I
      boot up Windows. I'll soon have to try that Win Emulator (WinE) on
      Linux and see if Notetab will run on it.

      Alan.
    • Alan_C
      ... 1. same here. ... 2. same here. ... Not obvious. It is just my speculation. # 2 above, each variable has inside it. combine that with the = that you
      Message 2 of 21 , Jan 5, 2005
        John Mitchell wrote:

        >^!Set %comment%=">>"
        >^!Select paragraph
        >^!Set %Str%=^$StrCopyLeft(^$GetSelection$;2)$
        >^!If ^%Str%=^%comment% ^!Prompt ^%Str%=^%comment%
        >^!If ^%comment%=^%Str% ^!Prompt ^%comment%=^%Str%
        >; End of clip -------
        >
        >If I run it against an open document containing arbitrary text the first
        >^!If tests TRUE and the second tests FALSE
        >
        1. same here.

        >, except when the first two
        >characters of the current paragraph are >>, in which case both tests
        >resolve to FALSE!!
        >
        >
        2. same here.

        >Am I about to be mightily embarrassed when someone points out an obvious
        >explanation?
        >
        Not obvious. It is just my speculation.

        # 2 above, each variable has >> inside it.

        combine that with the = that you have in between each of the two
        variables results in:

        >>=>>

        And that looks like it could mean "greater than or equal to"

        Perhaps the parser gets confused. Technically I suppose it shouldn't.

        I just tested:

        ^!Set %comment%=">>"
        ^!Select paragraph
        ^!Set %Str%=^$StrCopyLeft(^$GetSelection$;2)$
        ^!IfSame "^%comment%" "^%Str%" next else Skip
        ^!Prompt ^%comment% ^%Str%
        ;--------

        Works fine.

        Alan.
      • John Mitchell
        Alan Thanks. I ve submitted a bug report. Regards, John M ... From: Alan_C To: ntb-clips@yahoogroups.com Date: Wed, 05 Jan 2005 22:01:10
        Message 3 of 21 , Jan 5, 2005
          Alan

          Thanks. I've submitted a bug report.

          Regards, John M

          ----- Original message -----
          From: "Alan_C" <acumming@...>
          To: ntb-clips@yahoogroups.com
          Date: Wed, 05 Jan 2005 22:01:10 -0800
          Subject: Re: [Clip] ^!If Bug ?


          John Mitchell wrote:

          >^!Set %comment%=">>"
          >^!Select paragraph
          >^!Set %Str%=^$StrCopyLeft(^$GetSelection$;2)$
          >^!If ^%Str%=^%comment% ^!Prompt ^%Str%=^%comment%
          >^!If ^%comment%=^%Str% ^!Prompt ^%comment%=^%Str%
          >; End of clip -------
          >
          >If I run it against an open document containing arbitrary text the first
          >^!If tests TRUE and the second tests FALSE
          >
          1. same here.

          >, except when the first two
          >characters of the current paragraph are >>, in which case both tests
          >resolve to FALSE!!
          >
          >
          2. same here.
        • Alan_C
          (I wonder if John saw RS s post about quoting the variable names) I went to the www interface of Yahoo Groups. There I saw RS s post from earlier in the day
          Message 4 of 21 , Jan 5, 2005
            (I wonder if John saw RS's post about quoting the variable names)

            I went to the www interface of Yahoo Groups. There I saw RS's post from
            earlier in the day of which it's now three hours since RS sent that post
            to this list and I have still not received that post via the email.

            That's been happening a lot here lately. Unless I wait a day or longer
            to reply or else go to the www Yahoo groups interface, then I am taking
            a risk that I'll post to the list and duplicate what someone else has
            already posted.

            I'm curious: Is this a list wide thing or am I the only one it happens
            to or is it happen to only a small percentage of list recipients?

            Alan.

            John Mitchell wrote:
            > Alan
            >
            > Thanks. I've submitted a bug report.
            >
            > Regards, John M
            >
            > ----- Original message -----
            > From: "Alan_C" <acumming@...>
            > To: ntb-clips@yahoogroups.com
            > Date: Wed, 05 Jan 2005 22:01:10 -0800
            > Subject: Re: [Clip] ^!If Bug ?
            >
            >
            > John Mitchell wrote:
            >
            >>^!Set %comment%=">>"
            >>^!Select paragraph
            >>^!Set %Str%=^$StrCopyLeft(^$GetSelection$;2)$
            >>^!If ^%Str%=^%comment% ^!Prompt ^%Str%=^%comment%
            >>^!If ^%comment%=^%Str% ^!Prompt ^%comment%=^%Str%
            >>; End of clip -------
            >>
            >>If I run it against an open document containing arbitrary text the first
            >>^!If tests TRUE and the second tests FALSE
            >>
            > 1. same here.
            >
            >>, except when the first two
            >>characters of the current paragraph are >>, in which case both tests
            >>resolve to FALSE!!
            >>
            >>
            > 2. same here.
          • Don - htmlfixit.com
            I played with this some more using the following clip: ; Start of clip ------- ^!Jump Doc_Start ^!Set %comment%=
            Message 5 of 21 , Jan 6, 2005
              I played with this some more using the following clip:
              ; Start of clip -------
              ^!Jump Doc_Start
              ^!Set %comment%="<h"
              :Loop
              ^!Select paragraph
              ^!Set %Str%=^$StrCopyLeft(^$GetSelection$;2)$
              ^!Info [C]str:*^%Str%* comment:*^%comment%*
              ^!If "^%Str%"="^%comment%" ^!Prompt Prompt One: ^%Str%=^%comment%
              ^!Info [C]str:*^%Str%* comment:*^%comment%*
              ^!If "^%comment%"="^%Str%" ^!Prompt Prompt Two: ^%comment%=^%Str%
              ^!Info [C]str:*^%Str%* comment:*^%comment%*
              ^!Jump Select_End
              ^!Jump +1
              ^!Goto Loop
              ; End of clip -------

              I ran it on an html file (which has a couple of <h tags near the top).
              I think a couple of things may be coming into play:
              1. I think that >> may have some special meaning as it syntax highlights
              and appears to include a return in the info box as it's value.
              2. I think that you should be using quotes if you are trying to compare
              strings. Without quotes I think that what it does is give a 0 or 1
              value for null or not null. Because they are both not null, I think
              that you get positive results when you thought you were comparing string
              content because you are instead testing true/false for content. I think
              that this won't work correctly with >> on a true/false basis because it
              isn't a typical string. It seemed to work correctly and test true/false
              with a different string outside of quotes. If you add quotes, like I
              did above, then it works as you would have expected it to the first time
              I think.

              So is this a bug? Maybe not.
            • Don - htmlfixit.com
              ... I just did it on the bug one myself. I got all the other replies after I posted one thinking geez, nobody really dug into this yet. I post then promptly
              Message 6 of 21 , Jan 6, 2005
                > That's been happening a lot here lately. Unless I wait a day or longer
                > to reply or else go to the www Yahoo groups interface, then I am taking
                > a risk that I'll post to the list and duplicate what someone else has
                > already posted.
                >
                > I'm curious: Is this a list wide thing or am I the only one it happens
                > to or is it happen to only a small percentage of list recipients?

                I just did it on the bug one myself. I got all the other replies after
                I posted one thinking geez, nobody really dug into this yet. I post
                then promptly recieve several others. It seems to happen when it wants
                to. It may also have to do with moderation sometimes. If a moderated
                person posts, it will appear once approved but dated/timed as of the
                original sent time. I have also noticed that time on the senders
                machine, if off, will affect how the message is handled. Recently
                someone (no names used to protect the party ;-) ) had their computer
                off 12 hours and I was getting their messages popping up higher than the
                other current messages.

                I just want to say thanks to our moderators. I do several lists and I
                know it gets busy at times. It sure is nice to have a spam free list on
                the other hand. I know how much spam my groups get, so I know how often
                you all are undoubtely taking a viagra spam for our benefit.
              • Jody
                Hi John, Thanks for sending it to me at bugs@fookes.com. Sorry for getting in on this late. Been busy elsewhere. ;) This *may be* happening because is a
                Message 7 of 21 , Jan 6, 2005
                  Hi John,

                  Thanks for sending it to me at bugs@....

                  Sorry for getting in on this late. Been busy elsewhere. ;)

                  This *may be* happening because ">>" is a special code from the old
                  days so it is confusing the interpreter...

                  In ^!Info it is the same as ^p, cr/lf, line break.

                  ^!Info See the>>line break?>>>>Also, see what the variable contains in the ^!Info.

                  ^!Insert >>text
                  ^!Set %comment%=>>
                  ^!Select Line
                  ^!Set %Str%=^$StrCopyLeft("^$GetSelection$";2)$
                  ^!info ~^%comment%~break~^%Str%~ >>>> blank line above

                  >Unless this is only happening to me, then it looks like a bug.
                  >
                  >; Start of clip -------
                  >^!Set %comment%=">>"
                  >^!Select paragraph
                  >^!Set %Str%=^$StrCopyLeft(^$GetSelection$;2)$
                  >^!If ^%Str%=^%comment% ^!Prompt ^%Str%=^%comment%
                  >^!If ^%comment%=^%Str% ^!Prompt ^%comment%=^%Str%
                  >; End of clip -------


                  Take care,
                  Jody Adair

                  The whole world doth err save you and me,
                  and even thou doest err some! ;)
                  http://clean-funnies.com
                  http://notetab.net, http://fookes.us
                • Jody
                  Hi Don, ... I just came to this one Don. You are correct. See my other message. In short though, it was what was first used before ^p. ... documented anymore.
                  Message 8 of 21 , Jan 6, 2005
                    Hi Don,

                    >1. I think that >> may have some special meaning as it syntax highlights
                    >and appears to include a return in the info box as it's value.

                    I just came to this one Don. You are correct. See my other
                    message. In short though, it was what was first used before ^p.
                    >> is left in for backwards compatibility although it is not
                    documented anymore.

                    ^!Info breaker>>breaker>>1 9 ;)

                    Happy Clip'n!
                    Jody

                    All Lists: http://www.fookes.us/maillist.htm
                    Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
                    UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                    Options: http://groups.yahoo.com/group/ntb-clips
                    http://www.clean-funnies.com, http://www.sojourner.us/software
                  • John Mitchell
                    Jody, RS, Don, Alan, and anyone else I have missed. Thanks for your help with this. Time delays in the arrival of replies have extended this discussion but it
                    Message 9 of 21 , Jan 6, 2005
                      Jody, RS, Don, Alan, and anyone else I have missed.

                      Thanks for your help with this. Time delays in the arrival of replies
                      have extended this discussion but it has all been useful input.

                      Jody, perhaps the next release of the documentation/help could be
                      amended to include a mention of ">>".

                      More generally, I expect I'm not alone in my level of confusion with the
                      way that strings are interpreted in NTB so some clear guidance, with
                      examples, would also be a welcome addition to the docs. Here's an
                      example of what I mean.

                      ^!Set %a%="ASDF"
                      ^!Set %b%="ZXCV"
                      ^!Set %c%=^%a%^%b%
                      ^!Set %d%=^%a%"ZXCV"
                      ^!Info ^%a%^%b%
                      ; .......... Displays ASDFZXCV (expected)
                      ^!Info ^%c%
                      ; .......... Displays ASDFZXCV (expected)
                      ^!Info ^%d%
                      ; .......... Displays ASDF"ZXCV" (inconsistent?)

                      For consistency, I'd expect quotes to *always* be treated as string
                      delimeters unless escaped. This is apparently not the case.

                      Regards, John Mitchell

                      ----- Original message -----
                      From: "Jody" <kjv-av1611@...>
                      To: ntb-clips@yahoogroups.com
                      Date: Thu, 06 Jan 2005 13:56:34 -0600
                      Subject: Re: [Clip] ^!If Bug ?


                      Hi Don,

                      >1. I think that >> may have some special meaning as it syntax highlights
                      >and appears to include a return in the info box as it's value.

                      I just came to this one Don. You are correct. See my other
                      message. In short though, it was what was first used before ^p.
                      >> is left in for backwards compatibility although it is not
                      documented anymore.

                      ^!Info breaker>>breaker>>1 9 ;)

                      Happy Clip'n!
                      Jody

                      All Lists: http://www.fookes.us/maillist.htm
                      Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
                      UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                      Options: http://groups.yahoo.com/group/ntb-clips
                      http://www.clean-funnies.com, http://www.sojourner.us/software
                    • abairheart
                      ... first ... two ... obvious ... Strings should be compared within quotes. IF this is a bug, it s that it did not generate an error. Unquoted text should
                      Message 10 of 21 , Jan 7, 2005
                        --- In ntb-clips@yahoogroups.com, "John Mitchell" <notetab@l...>
                        wrote:
                        > ; Start of clip -------
                        > ^!Set %comment%=">>"
                        > ^!Select paragraph
                        > ^!Set %Str%=^$StrCopyLeft(^$GetSelection$;2)$
                        > ^!If ^%Str%=^%comment% ^!Prompt ^%Str%=^%comment%
                        > ^!If ^%comment%=^%Str% ^!Prompt ^%comment%=^%Str%
                        > ; End of clip -------
                        >
                        > If I run it against an open document containing arbitrary text the
                        first
                        > ^!If tests TRUE and the second tests FALSE, except when the first
                        two
                        > characters of the current paragraph are >>, in which case both tests
                        > resolve to FALSE!!
                        >
                        > Am I about to be mightily embarrassed when someone points out an
                        obvious
                        > explanation?


                        Strings should be compared within quotes. IF this is a bug, it's that
                        it did not generate an error. Unquoted text should evaluate as 0
                        (zero) = false.

                        The mystery is, what >>=xx evaluates to.

                        Reporting a bug, when you're doing something that you shouldn't be
                        doing is not kosher.

                        Abair.
                      • John Mitchell
                        There was a fair bit of discussion about this. Due to delays in posts making it to the Clips group it probably went on longer than necessary. My bug report was
                        Message 11 of 21 , Jan 7, 2005
                          There was a fair bit of discussion about this. Due to delays in posts
                          making it to the Clips group it probably went on longer than necessary.

                          My bug report was submitted in good faith and whether or not I was doing
                          something I shouldn't is open to question since the documentation is not
                          at all clear regarding the interpretation of quoted strings and, per an
                          earlier append, in my opinion the way quoted strings are handled is
                          inconsistent.

                          Regards, John M

                          ----- Original message -----
                          From: "abairheart" <abairheart@...>
                          To: ntb-clips@yahoogroups.com
                          Date: Fri, 07 Jan 2005 22:01:54 -0000
                          Subject: [Clip] Re: ^!If Bug ?

                          ....Snip.....

                          Reporting a bug, when you're doing something that you shouldn't be
                          doing is not kosher.

                          ....Snip.....

                          Abair.
                        • acummingsus
                          ... wrote: [ . . ] ... The string is *everything* to the right of the = Therefore, you only quoted a *part* of the string in: ^!Set %d%=^% a% ZXCV To the
                          Message 12 of 21 , Jan 7, 2005
                            --- In ntb-clips@yahoogroups.com, "John Mitchell" <notetab@l...>
                            wrote:
                            [ . . ]
                            >
                            > ^!Set %a%="ASDF"
                            > ^!Set %b%="ZXCV"
                            > ^!Set %c%=^%a%^%b%
                            > ^!Set %d%=^%a%"ZXCV"
                            > ^!Info ^%a%^%b%
                            > ; .......... Displays ASDFZXCV (expected)
                            > ^!Info ^%c%
                            > ; .......... Displays ASDFZXCV (expected)
                            > ^!Info ^%d%
                            > ; .......... Displays ASDF"ZXCV" (inconsistent?)
                            >
                            > For consistency, I'd expect quotes to *always* be treated as string
                            > delimeters unless escaped. This is apparently not the case.

                            The string is *everything* to the right of the =

                            Therefore, you only quoted a *part* of the string in: ^!Set %d%=^%
                            a%"ZXCV"

                            To the right of the = Ntab does its best to make
                            all_to_the_right_of_the_= into your string of the contents of
                            whatever variable name that's on the left side of the =

                            (Since *string* is *all*_to_the_right_of_the_=):

                            if U did not want quotes in your string: ^!Set %d%="^%a%ZXCV"

                            if U did want quotes in your string: ^!Set %d%="^%a%"ZXCV""

                            so it is not: either the quote is a string delimiter or not a string
                            delimiter. The picture is not that simple. Very key is that
                            *context* is involved; for instance, what is the *context* in which
                            the quotes are used.

                            ---
                            Try Perl if you really want context stuff; by comparison, Notetab has
                            very little. I still scratching my head over the many many and
                            differing context things in Perl.
                            --- (end_of_Perl, back to Ntab once again),

                            When what will become a string (all quoted, not just a part of the
                            string quoted) is quoted, this is the context in which the quote
                            serves to act as string delimiter.

                            Have you seen Jody's ClipClass?

                            It used to available as zip file for download from his site at
                            www.notetab.net

                            The Notetab help file is not meant to learn/tutorial non programmer
                            newbies; it assumes at least a little former scripting/programming
                            experience. But, ClipClass is targeted to the newbie I used it and
                            it worked very well for me.

                            ^!Set %a%="ASDF"
                            ^!Set %b%="ZXCV"
                            ^!Set %c%=^%a%^%b%
                            ;^!Set %d%="^%a%"ZXCV""
                            ^!Set %d%="^%a%ZXCV"
                            ^!Set %e%=ONE"TWO"
                            ^!Set %f%="THREEFOUR"
                            ^!Info ab^%NL%^%NL%^%a%^%b%
                            ; .......... Displays ASDFZXCV (expected)
                            ^!Info c^%NL%^%NL%^%c%
                            ; .......... Displays ASDFZXCV (expected)
                            ^!Info d^%NL%^%NL%^%d%
                            ; ..........
                            ^!Info e^%NL%^%NL%^%e%
                            ^!Info f^%NL%^%NL%^%f%

                            --
                            Alan.
                          • John Mitchell
                            Alan I didn t intend to start a holy war here. Perhaps my problem is that I have programmed, extensively, in many languages for many years. No doubt when I
                            Message 13 of 21 , Jan 7, 2005
                              Alan

                              I didn't intend to start a holy war here. Perhaps my problem is that I
                              have programmed, extensively, in many languages for many years. No doubt
                              when I have written a few more clips I'll get the hang of NTB's
                              idiosyncracies. By trial, error, and example I'll get there but until I
                              see the rules of engagement I'll still be hard to convince that..

                              ^!Info qwerty
                              ^!Info "qwerty"
                              ^!Set %a%="qwerty"
                              ^!Info ^%a%

                              ..which yields

                              qwerty
                              "qwerty"
                              qwerty

                              ..is the model of consistency.

                              I think it's reasonable to expect the documentation (Help and/or PDF) to
                              define the rules of interpretation for people (like me) who are more
                              than happy to RTFM.

                              Regards, John M


                              ----- Original message -----
                              From: "acummingsus" <acumming@...>
                              To: ntb-clips@yahoogroups.com
                              Date: Sat, 08 Jan 2005 02:17:21 -0000
                              Subject: [Clip] Re: String Interpretation (was ^!If Bug ?)



                              --- In ntb-clips@yahoogroups.com, "John Mitchell" <notetab@l...>
                              wrote:
                              [ . . ]
                              >
                              > ^!Set %a%="ASDF"
                              > ^!Set %b%="ZXCV"
                              > ^!Set %c%=^%a%^%b%
                              > ^!Set %d%=^%a%"ZXCV"
                              > ^!Info ^%a%^%b%
                              > ; .......... Displays ASDFZXCV (expected)
                              > ^!Info ^%c%
                              > ; .......... Displays ASDFZXCV (expected)
                              > ^!Info ^%d%
                              > ; .......... Displays ASDF"ZXCV" (inconsistent?)
                              >
                              > For consistency, I'd expect quotes to *always* be treated as string
                              > delimeters unless escaped. This is apparently not the case.

                              The string is *everything* to the right of the =

                              Therefore, you only quoted a *part* of the string in: ^!Set %d%=^%
                              a%"ZXCV"

                              To the right of the = Ntab does its best to make
                              all_to_the_right_of_the_= into your string of the contents of
                              whatever variable name that's on the left side of the =

                              (Since *string* is *all*_to_the_right_of_the_=):

                              if U did not want quotes in your string: ^!Set %d%="^%a%ZXCV"

                              if U did want quotes in your string: ^!Set %d%="^%a%"ZXCV""

                              so it is not: either the quote is a string delimiter or not a string
                              delimiter. The picture is not that simple. Very key is that
                              *context* is involved; for instance, what is the *context* in which
                              the quotes are used.

                              ---
                              Try Perl if you really want context stuff; by comparison, Notetab has
                              very little. I still scratching my head over the many many and
                              differing context things in Perl.
                              --- (end_of_Perl, back to Ntab once again),

                              When what will become a string (all quoted, not just a part of the
                              string quoted) is quoted, this is the context in which the quote
                              serves to act as string delimiter.

                              Have you seen Jody's ClipClass?

                              It used to available as zip file for download from his site at
                              www.notetab.net

                              The Notetab help file is not meant to learn/tutorial non programmer
                              newbies; it assumes at least a little former scripting/programming
                              experience. But, ClipClass is targeted to the newbie I used it and
                              it worked very well for me.

                              ^!Set %a%="ASDF"
                              ^!Set %b%="ZXCV"
                              ^!Set %c%=^%a%^%b%
                              ;^!Set %d%="^%a%"ZXCV""
                              ^!Set %d%="^%a%ZXCV"
                              ^!Set %e%=ONE"TWO"
                              ^!Set %f%="THREEFOUR"
                              ^!Info ab^%NL%^%NL%^%a%^%b%
                              ; .......... Displays ASDFZXCV (expected)
                              ^!Info c^%NL%^%NL%^%c%
                              ; .......... Displays ASDFZXCV (expected)
                              ^!Info d^%NL%^%NL%^%d%
                              ; ..........
                              ^!Info e^%NL%^%NL%^%e%
                              ^!Info f^%NL%^%NL%^%f%

                              --
                              Alan.
                            • Alan_C
                              ... Nor me either. I apologize for assuming that you had no programming experience. What, did I do something to make you think that I took it like that, a
                              Message 14 of 21 , Jan 7, 2005
                                John Mitchell wrote:
                                > Alan
                                >
                                > I didn't intend to start a holy war here.

                                Nor me either. I apologize for assuming that you had no programming
                                experience. What, did I do something to make you think that I took it
                                like that, a war? ? My only intent was to expose about quotes and
                                setting and extracting contents of variable. (literal string not
                                covered until now -- see below for literal string)

                                Importantly, since clipclass provides such good syntax guidelines for
                                someone who is new to Notetab -- thus, I've no further need to reply to
                                ntb-clips list about syntax and rules thereof -- instead, I'll refer
                                whoever query to ClipClass because it's been revised and can do a much
                                much better job than I can)

                                But the clipclass does set the stage for using quotes. A user can
                                follow the quoting recomendations in clipclass and be ok, can do so
                                until the user gains experience by then the user is familiar enough so
                                as to know what to do. At least that was my experience anyways. Your
                                mileage may vary.

                                So I still recommend clipclass for someone new/unfamiliar with Notetab.
                                I shoould done it that way in the first place. Sorry for being clumsy
                                while I make an attempt (the mentioned assumption on my part)

                                [ . . ]
                                > see the rules of engagement I'll still be hard to convince that..
                                >
                                > ^!Info qwerty
                                > ^!Info "qwerty"
                                > ^!Set %a%="qwerty"
                                > ^!Info ^%a%
                                >
                                > .which yields
                                >
                                > qwerty
                                > "qwerty"
                                > qwerty
                                >
                                > .is the model of consistency.

                                With Notetab, setting into a variable is one thing which my last post
                                shared on that. Displaying a literal string is another matter, such as
                                your use of the ^!Info above.

                                The rules that apply to setting a variable and extracting the contents
                                of a variable (as far as quotes concerned) are not applicable with the
                                use of literal string (your above "inconsistency" or #2 in the middle
                                uses a literal string it does not make use of a variable).

                                Once again, this is a context thing (I think) my apologies if it is not.
                                But I think it is a context issue because it involves the context of
                                when, where, and how the quotes show_up/reside within the greater
                                context of the overall code example.

                                >
                                > I think it's reasonable to expect the documentation (Help and/or PDF) to
                                > define the rules of interpretation for people (like me) who are more
                                > than happy to RTFM.

                                Well then, I suppose the help file lacks. You're right. I've no
                                argument. I agree. I certainly didn't mean to argue by formerly
                                refering you to clipclass. I only meant to share what I had come across
                                that had helped me.

                                --
                                Alan.
                              • John Mitchell
                                Alan No probs, and I really do appreciate the help from you and all the others on this group. I m also a huge fan of NTB. I use it all day and every day and
                                Message 15 of 21 , Jan 7, 2005
                                  Alan

                                  No probs, and I really do appreciate the help from you and all the
                                  others on this group. I'm also a huge fan of NTB. I use it all day and
                                  every day and the more I delve into templates and clips the more mileage
                                  I get out of it.

                                  The term holy war alludes to the tendency of some group "discussions" I
                                  have seen, mainly in other fora, to descend into a ping pong match
                                  between believers and non-believers. I thought it was a common term, but
                                  perhaps not. In any case, no slight intended and sorry if I was a bit
                                  abrupt.

                                  I've started using Clip Assistant which will undoubtedly help keep me on
                                  the straight and narrow.

                                  Regards, John M


                                  ----- Original message -----
                                  From: "Alan_C" <acumming@...>
                                  To: ntb-clips@yahoogroups.com
                                  Date: Fri, 07 Jan 2005 22:43:29 -0800
                                  Subject: Re: [Clip] Re: String Interpretation (was ^!If Bug ?)


                                  John Mitchell wrote:
                                  > Alan
                                  >
                                  > I didn't intend to start a holy war here.

                                  Nor me either. I apologize for assuming that you had no programming
                                  experience. What, did I do something to make you think that I took it
                                  like that, a war? ? My only intent was to expose about quotes and
                                  setting and extracting contents of variable. (literal string not
                                  covered until now -- see below for literal string)

                                  Importantly, since clipclass provides such good syntax guidelines for
                                  someone who is new to Notetab -- thus, I've no further need to reply to
                                  ntb-clips list about syntax and rules thereof -- instead, I'll refer
                                  whoever query to ClipClass because it's been revised and can do a much
                                  much better job than I can)

                                  But the clipclass does set the stage for using quotes. A user can
                                  follow the quoting recomendations in clipclass and be ok, can do so
                                  until the user gains experience by then the user is familiar enough so
                                  as to know what to do. At least that was my experience anyways. Your
                                  mileage may vary.

                                  So I still recommend clipclass for someone new/unfamiliar with Notetab.
                                  I shoould done it that way in the first place. Sorry for being clumsy
                                  while I make an attempt (the mentioned assumption on my part)

                                  [ . . ]
                                  > see the rules of engagement I'll still be hard to convince that..
                                  >
                                  > ^!Info qwerty
                                  > ^!Info "qwerty"
                                  > ^!Set %a%="qwerty"
                                  > ^!Info ^%a%
                                  >
                                  > .which yields
                                  >
                                  > qwerty
                                  > "qwerty"
                                  > qwerty
                                  >
                                  > .is the model of consistency.

                                  With Notetab, setting into a variable is one thing which my last post
                                  shared on that. Displaying a literal string is another matter, such as
                                  your use of the ^!Info above.

                                  The rules that apply to setting a variable and extracting the contents
                                  of a variable (as far as quotes concerned) are not applicable with the
                                  use of literal string (your above "inconsistency" or #2 in the middle
                                  uses a literal string it does not make use of a variable).

                                  Once again, this is a context thing (I think) my apologies if it is not.
                                  But I think it is a context issue because it involves the context of
                                  when, where, and how the quotes show_up/reside within the greater
                                  context of the overall code example.

                                  >
                                  > I think it's reasonable to expect the documentation (Help and/or PDF) to
                                  > define the rules of interpretation for people (like me) who are more
                                  > than happy to RTFM.

                                  Well then, I suppose the help file lacks. You're right. I've no
                                  argument. I agree. I certainly didn't mean to argue by formerly
                                  refering you to clipclass. I only meant to share what I had come across
                                  that had helped me.

                                  --
                                  Alan.



                                  Yahoo! Groups Links
                                • abairheart
                                  ... posts ... necessary. ... doing ... is not ... per an ... No offense intended. Yes, quotes handling is inconsistent in NoteTab. However, I believe the help
                                  Message 16 of 21 , Jan 9, 2005
                                    --- In ntb-clips@yahoogroups.com, "John Mitchell" <notetab@l...>
                                    wrote:
                                    > There was a fair bit of discussion about this. Due to delays in
                                    posts
                                    > making it to the Clips group it probably went on longer than
                                    necessary.
                                    >
                                    > My bug report was submitted in good faith and whether or not I was
                                    doing
                                    > something I shouldn't is open to question since the documentation
                                    is not
                                    > at all clear regarding the interpretation of quoted strings and,
                                    per an
                                    > earlier append, in my opinion the way quoted strings are handled is
                                    > inconsistent.

                                    No offense intended. Yes, quotes handling is inconsistent in NoteTab.
                                    However, I believe the help file for ^!If commands does mention the
                                    need for quotes in string testing.

                                    Muddying the waters further:
                                    Where Help is NOT clear is in the side effects from various special
                                    characters. Not just the ones Jody mentioned '>>', but '^' and '#' as
                                    well.

                                    I don't recall if anyone mentioned the interaction of '>>' when it
                                    precededs or follows the '=' sign in the test.

                                    Consider the follwoing test:
                                    'If string=>>'
                                    This might parse as
                                    'If "string" => ">"'
                                    while
                                    'If >>=string'
                                    may parse as
                                    '">" >= "string"'
                                    rather than generating an error.


                                    Abair
                                  • Jody
                                    Hi Alan, Thanks for the mention. Awhile back I renamed it. It is now called ClipTut The following is a download for a Clipbook programming tutorial designed to
                                    Message 17 of 21 , Jan 11, 2005
                                      Hi Alan,

                                      Thanks for the mention. Awhile back I renamed it. It is now called

                                      ClipTut

                                      The following is a download for a Clipbook programming tutorial
                                      designed to walk you through Clip writing. It includes "Getting
                                      Started" (which is a web page with a number of images displaying
                                      different parts of NoteTab that deals with Clipbooks), making a
                                      Clipbook Library, adding Clips, and editing Clips, on to more
                                      difficult Clip writing. Be sure to read the Introduction also.
                                      Open ClipTut.clb and then click on the ClipTut.otl Outline Clip
                                      to open the Outline.

                                      All the contents of the zip files go in NoteTab's Libraries
                                      folder. http://www.notetab.net/zip/cliptut.zip

                                      You can also sign up for the NoteTab Clips List to get answers to
                                      Clip questions, but please do not post there concerning the
                                      tutorial. NoteTab Clips Subscribe & Edit Options:

                                      Subscribe, unSubscribe, Options
                                      mailto:ntb-Clips-Subscribe@yahoogroups.com
                                      mailto:ntb-Clips-unSubscribe@yahoogroups.com
                                      http://groups.yahoo.com/group/ntb-clips

                                      Happy Clip'n! Jody

                                      http://www.notetab.net http://www.notetab.net/html/cd-info.htm
                                      http://www.fookes.com/regnow.html?2448&item=home

                                      >Have you seen Jody's ClipClass?
                                      >
                                      >It used to available as zip file for download from his site at
                                      >www.notetab.net
                                      >
                                      >The Notetab help file is not meant to learn/tutorial non programmer
                                      >newbies; it assumes at least a little former scripting/programming
                                      >experience. But, ClipClass is targeted to the newbie I used it and
                                      >it worked very well for me.
                                      >
                                      >^!Set %a%="ASDF"
                                      >^!Set %b%="ZXCV"
                                      >^!Set %c%=^%a%^%b%
                                      >;^!Set %d%="^%a%"ZXCV""
                                      >^!Set %d%="^%a%ZXCV"
                                      >^!Set %e%=ONE"TWO"
                                      >^!Set %f%="THREEFOUR"
                                      >^!Info ab^%NL%^%NL%^%a%^%b%
                                      >; .......... Displays ASDFZXCV (expected)
                                      >^!Info c^%NL%^%NL%^%c%
                                      >; .......... Displays ASDFZXCV (expected)
                                      >^!Info d^%NL%^%NL%^%d%
                                      >; ..........
                                      >^!Info e^%NL%^%NL%^%e%
                                      >^!Info f^%NL%^%NL%^%f%
                                      >
                                      >--
                                      >Alan.


                                      Happy Clip'n!
                                      Jody

                                      All Lists: http://www.fookes.us/maillist.htm
                                      Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
                                      UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                                      Options: http://groups.yahoo.com/group/ntb-clips
                                      http://www.clean-funnies.com, http://www.sojourner.us/software
                                    Your message has been successfully submitted and would be delivered to recipients shortly.