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

Re: [Clip] Comparing with a space

Expand Messages
  • Art Kocsis
    ... The easiest way is to simply enclose your operands in quotes: ^!If = ^$GetChar$ GoFurther but for better visibility and reliability, it is better to
    Message 1 of 9 , Jul 18, 2013
    • 0 Attachment
      At 7/18/2013 08:20 AM, J.-F. wrote:
      >Hello List,
      >
      >I'm sorry if the question seems a bit "trivial", but I can't find the
      >way to compare the cursor position with a space. If I would like to
      >compare with a dash, I would write:
      >^!If -=^$GetChar$ GoFurther
      >But it seems more tricky to compare with a space or a tab. Probably I'm
      >missing a little syntax element...

      The easiest way is to simply enclose your operands in quotes:

      ^!If " "="^$GetChar$" GoFurther

      but for better visibility and reliability, it is better to use the built-in predefined variables (^%empty%, ^%space%, ^%nl%, etc), for special characters such as these:

      ^!If "^%empty%"="^$GetChar$" GoFurther

      In addition, make a habit of enclosing text strings in quotes.

      Art
    • Jean-François Colas
      Hello Art, Thanks, with the ^%Space% and quoting I finally got it. ... Where can I complete the etc ? Regards, J.-F.
      Message 2 of 9 , Jul 19, 2013
      • 0 Attachment
        Hello Art,

        Thanks, with the ^%Space% and quoting I finally got it.

        You said:
        > the built-in predefined variables (^%empty%, ^%space%, ^%nl%, etc),

        Where can I complete the etc ?

        Regards,
        J.-F.


        Le 18/07/2013 20:41, Art Kocsis a écrit :
        > At 7/18/2013 08:20 AM, J.-F. wrote:
        >> Hello List,
        >>
        >> I'm sorry if the question seems a bit "trivial", but I can't find the
        >> way to compare the cursor position with a space. If I would like to
        >> compare with a dash, I would write:
        >> ^!If -=^$GetChar$ GoFurther
        >> But it seems more tricky to compare with a space or a tab. Probably I'm
        >> missing a little syntax element...
        >
        > The easiest way is to simply enclose your operands in quotes:
        >
        > ^!If " "="^$GetChar$" GoFurther
        >
        > but for better visibility and reliability, it is better to use the built-in predefined variables (^%empty%, ^%space%, ^%nl%, etc), for special characters such as these:
        >
        > ^!If "^%empty%"="^$GetChar$" GoFurther
        >
        > In addition, make a habit of enclosing text strings in quotes.
        >
        > Art
        >
        >
        >
        > ------------------------------------
        >
        > Fookes Software: http://www.fookes.com/
        > NoteTab website: http://www.notetab.com/
        > NoteTab Discussion Lists: http://www.notetab.com/groups.php
        >
        > ***
        > Yahoo! Groups Links
        >
        >
        >
        >
      • Art Kocsis
        ... At this stage the help files should be your constant companion and a good part of your leisure reading. Art
        Message 3 of 9 , Jul 19, 2013
        • 0 Attachment
          At 7/19/2013 08:39 AM, you wrote:
          >Hello Art,
          >Thanks, with the ^%Space% and quoting I finally got it.
          >You said:
          >> the built-in predefined variables (^%empty%, ^%space%, ^%nl%, etc),
          >Where can I complete the etc ?

          At this stage the help files should be your constant companion and a good part of your leisure reading.

          Art
        • Axel Berger
          ... Apart from a few basic standards even now I rarely type commands and functions but copy them from the help file just to make sure I get the syntax exactly
          Message 4 of 9 , Jul 19, 2013
          • 0 Attachment
            Art Kocsis wrote:
            > At this stage the help files should be your constant companion
            > and a good part of your leisure reading.

            Apart from a few basic standards even now I rarely type commands and
            functions but copy them from the help file just to make sure I get the
            syntax exactly right. At my age I have to.

            Axel
          • Alec Burgess
            Hi Jean-Francois: Art and Axel gave you the hint but just to be explicit - in Help - Help on clip programming: I searched for empty w/o quotes. ^%empty%
            Message 5 of 9 , Jul 19, 2013
            • 0 Attachment
              Hi Jean-Francois:
              Art and Axel gave you the hint but just to be explicit - in Help - Help
              on clip programming:
              I searched for "empty" w/o quotes. ^%empty% won't work because the Help
              search function is kind of lame in its treatment of special characters.

              First entry is Variables and half way down that page is the list you are
              searching for.
              btw: Favorites in the Help file is useful. I keep just two entries there
              - Find / Replace Text and Variables because these are the two I
              frequently find myself rechecking for exact details. :-)

              On 2013-07-19 11:39, Jean-François Colas wrote:
              > Thanks, with the ^%Space% and quoting I finally got it.
              >
              > You said:
              > > the built-in predefined variables (^%empty%, ^%space%, ^%nl%, etc),
              >
              > Where can I complete the etc ?
            • loro
              ... As Jody used to tell us frequently use the Index tab, not the Search one for commands, functions and the like. It works. Lotta
              Message 6 of 9 , Jul 19, 2013
              • 0 Attachment
                Alec wrote:
                >I searched for "empty" w/o quotes. ^%empty% won't work because the Help
                >search function is kind of lame in its treatment of special characters.

                As Jody used to tell us frequently use the Index tab, not the Search
                one for commands, functions and the like. It works.

                Lotta
              • Art Kocsis
                ... Heh. Putting age and stage in the same message reminds me of the old joke about the stages of a man s life. Yeah, I know only too well what you mean.
                Message 7 of 9 , Jul 19, 2013
                • 0 Attachment
                  At 7/19/2013 02:40 PM, Axel wrote:
                  >Art Kocsis wrote:
                  >> At this stage the help files should be your constant companion
                  >> and a good part of your leisure reading.
                  >
                  >Apart from a few basic standards even now I rarely type commands and
                  >functions but copy them from the help file just to make sure I get the
                  >syntax exactly right. At my age I have to.

                  Heh. Putting age and stage in the same message reminds me of the old joke about the stages of a man's life.

                  Yeah, I know only too well what you mean. However, given the shortcomings of the Help search function, I made single alphabetical lists of the commands and functions with short syntax descriptions and put them right in my cliplib. Makes for much easier searches since they're listed alphabetically and, if necessary, Notetab's search is available and is much better than the help search. It is easy to maintain - simple resort, is handy as it opens whenever I open the cliplib, and I can annotate it with tips, tricks and gotchas.

                  Art

                  BTW Alec, I deliberately left out the explicit instructions for the help file on the theory that it is necessary/beneficial to learn how to learn.
                • Don
                  I use Sheri s clip help or whatever it is called ... so it does the syntax for me. Love it. If you type the word it does the finding.
                  Message 8 of 9 , Jul 19, 2013
                  • 0 Attachment
                    I use Sheri's clip help or whatever it is called ... so it does the
                    syntax for me. Love it. If you type the word it does the finding.

                    On 7/19/2013 8:45 PM, Art Kocsis wrote:
                    > At 7/19/2013 02:40 PM, Axel wrote:
                    >> Art Kocsis wrote:
                    >>> At this stage the help files should be your constant companion
                    >>> and a good part of your leisure reading.
                    >>
                    >> Apart from a few basic standards even now I rarely type commands and
                    >> functions but copy them from the help file just to make sure I get the
                    >> syntax exactly right. At my age I have to.
                    >
                    > Heh. Putting age and stage in the same message reminds me of the old joke about the stages of a man's life.
                  Your message has been successfully submitted and would be delivered to recipients shortly.