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

5189^!Inc (was: clip help)

Expand Messages
  • Jody
    Dec 1, 2000
      Hi Elizabeth,

      >In place of the ^!Inc command I would use ^!Set
      >%N%=^$Calc(^%N%=1)$. I would set it up this way simply because I
      >can never get ^!Inc to work the way I want it to (probably
      >because I don't really understand what it is supposed to do).

      ^!Inc simply increments by one by default. You first set the
      variable to some number, usually one or zero and then in a loop
      somewhere (normally) you increment the variable.

      H=Inc Demo
      ^!Set %n%=0
      ^!Inc %n%
      ^!Continue ^%n%
      ^!Goto Loop

      This is from Help:

      ^!Inc VariableName [nn]

      Adds 1 to specified variable (increment). If you use the second
      optional parameter "nn", you can specify a different increment
      value. For example, if %var% contains the value 23 and you apply
      the command "^!Inc %var% 7" to it, the new value will be 30.


      H=Inc Demo nn
      ^!Set %n%=0
      ^!Inc %n% ^?[Increment by=5]
      ^!Continue ^%n%
      ^!Goto Loop

      Normally you would have a line in the Clip telling NoteTab when
      to stop the loop else it would just keep looping unless you use a
      prompt like above.

      H=Inc Demo Until
      ^!Toolbar New Document
      ^!Set %n%=0
      ^!Inc %n%
      ^!InsertText ^%n%^p
      ^!If ^%n% = ^?[Stop at what number=10] Next else Loop
      ^!Skip Trash document?
      ^!Goto End
      ^!Close Discard

      ^!Dec is just the opposite.

      Happy Clip'n!


      Subscribe, UnSubscribe, Options
    • Show all 3 messages in this topic