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

Re: [Clip] Question about ^!If statements

Expand Messages
  • Jody
    Hi Alan and Elizabeth, ... The code looked good to me when I peeked at it earlier. Elizabeth, when you get into those situations, try putting some ^!Prompt or
    Message 1 of 3 , Nov 29, 2000
    • 0 Attachment
      Hi Alan and Elizabeth,

      >H="testing"
      >^!Set %IRW%=^?[(H=22)choose==1|2]
      >^!Info ^%IRW%
      >^!If ^%IRW%<>1 Next ELSE Close
      >test
      >:Close
      >close
      >;-----<end of clip<<
      >
      >I opened (also in focus) a new document then ran above clip:
      >when I chose 2 it printed testclose into the document
      >when I chose 1 it printed close into the document

      The code looked good to me when I peeked at it earlier. Elizabeth,
      when you get into those situations, try putting some ^!Prompt or
      ^!Info checks in (drag/drop/select/backspace makes it fast). For
      instance:

      ^!Info %IRW%1 = ^%IRW%
      ^!If ^%IRW%=1 ^!Clip "Charged Report"
      ^!Info %IRW%2 = ^%IRW%
      ^!If ^%IRW%<>1 Next ELSE Close
      ^!Info %IRW%3 = ^%IRW%
      ^!Clip "Yesterday"

      or you could have wrote it like below putting two lines
      into one:

      ^!If ^%IRW%<>1 Close else ^!Clip "Charged Report"

      or as long as you would always either have a 1 or 0
      you were looking for:

      ^!IfFalse ^%IRW% Close else ^!Clip "Charged Report"

      Having it on one line seems less confusing to me with or without
      a ^!Clip command and is the reason for having a true/false side
      of the command for it to go to next depending on the variable.

      ^!If Integer1 <>= Integer2 GoToLabelTrue [ELSE GoToLabelFalse]
      ^!If "String1" <>= "String2" GoToLabelTrue [ELSE GoToLabelFalse]
      ^!IfFalse Value GoToLabelTrue [ELSE GoToLabelFalse]

      Happy Clip'n!
      Jody

      http://www.notetab.net

      Subscribe, UnSubscribe, Options
      mailto:Ntb-Clips-Subscribe@...
      mailto:Ntb-Clips-UnSubscribe@...
      http://www.egroups.com/group/ntb-clips
    Your message has been successfully submitted and would be delivered to recipients shortly.