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

23911Re: [Clip] Comparing with a space

Expand Messages
  • Art Kocsis
    Jul 18, 2013
      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.

    • Show all 9 messages in this topic