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

[Clip] Re: Why does a neg value cause a syntax error in calc?

Expand Messages
  • joy8388608
    ... Lotta - Thanks for going back and giving it more thought. I have, of course, already found a workaround, but this is a simpler and better one then I have
    Message 1 of 17 , Mar 2, 2011
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, loro <tabbie@...> wrote:
      >
      > joy8388608 wrote:
      > >; Syntax error when first var is not initialized and second is negative
      > >^!Set %JobAmt%=-10
      > >^!Set %Temp4%=^$Calc(^%Cash16P% + ^%JobAmt%)$
      >
      > Joy, I know this is old, but I was skimming through old post and
      > started to play with this again and I discovered something useful.
      > It's only when the negative number is the first to be added to the
      > not initiated variable the problem occurs.
      >
      > Try this.
      >
      > ^!Info ^$Calc(^%blah%+0+-5)$
      > ===> -5
      >
      > So if you always add zero first, I think it should work.
      >
      > :-)
      > Lotta
      >
      Lotta -
      Thanks for going back and giving it more thought. I have, of course, already found a workaround, but this is a simpler and better one then I have and I will remember this technique for the future as will others.

      Thanks!
      Joy
    Your message has been successfully submitted and would be delivered to recipients shortly.