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

Re: [Clip] I get an error message on this clip I copied from the help

Expand Messages
  • Jim Lowry
    Thanks, Eb. Your solution works too so I m happy. However, the help file needs changing to fix the error. Does Jody do that or who? Jim ...
    Message 1 of 6 , Aug 7, 2000
    • 0 Attachment
      Thanks, Eb.
      Your solution works too so I'm happy.

      However, the help file needs changing to fix the error. Does Jody do that
      or who?

      Jim


      > Hi Jim
      >>I get an error message on this clip I copied from the help
      > >^$[(^?[Fahrenheit]-32)*(5/9)]°C=^?[Fahrenheit]°F
      > > [error in expression]°C=89°F
      > I think "^?[...]" qualifies as a function. And the old ^$[
      > will no longer work with functions. You need to use the function
      > ^$Calc(expression)$ instead.
      >
      > Jody already gave you one formula, but here is another --
      > my favorite, 'cause you only need a single clip to convert
      > both ways (F-->C & C-->F).
      > Only two lines -- one input, one output:
      >
      > H="ToFromCelsius"
      > ;long line (one of two lines, total)
      > ^!SetArray %Switch%=^?{Number degrees?};^?{F or
      C?==_F^=°F;5/9;°C|C^=°C;9/5;°F}
      > ;long line
      > ^!Info ^%Switch1%^%Switch2% =
      ^$Calc((^%Switch1%+40)*^%Switch3%-40)$^%Switch4%
      >
      > Cheers, Eb
      >
    • Jody
      Hi Jim, ... Eric is aware of it now - you may have missed my post telling how to report things and that I would take care of it. It should have worked as is,
      Message 2 of 6 , Aug 7, 2000
      • 0 Attachment
        Hi Jim,

        > However, the help file needs changing to fix the error. Does
        > Jody do that or who?

        Eric is aware of it now - you may have missed my post telling how
        to report things and that I would take care of it. It should
        have worked as is, but obviously not. <g> Thanks!

        Old syntax prior to NoteTab 4.51:

        Note that since NoteTab 4.8, the old format will not work if the
        expression is built from the values of variables and functions.
        You should use the ^$Calc(Expression[;Decimals])$ function
        instead.

        Happy Clip'n!
        Jody

        http://www.sureword.com/notetab

        Subscribe, UnSubscribe, Options
        mailto:Ntb-Clips-Subscribe@...
        mailto:Ntb-Clips-UnSubscribe@...
        http://www.egroups.com/group/ntb-clips
      • Charles M. Raine
        ... First let me say, I think that is a real Neat little clip, but I think it needs to be de-mystified a bit, for the less experienced. The ^!SetArray
        Message 3 of 6 , Aug 7, 2000
        • 0 Attachment
          At 01:06 PM 8/5/2000 -0400, Eb Guenther wrote:

          >H="ToFromCelsius"
          >;long line (one of two lines, total)
          >^!SetArray %Switch%=^?{Number degrees?};^?{F or C?==_F^=°F;5/9;°C|C^=°C;9/5;°F}
          >;long line
          >^!Info ^%Switch1%^%Switch2% = ^$Calc((^%Switch1%+40)*^%Switch3%-40)$^%Switch4%
          First let me say, I think that is a real Neat little clip, but I think it needs to be de-mystified a bit, for the less experienced.

          The ^!SetArray %Switch%=... creates a 4 element array containing either:

          Element 1 - nn degrees (or) nn degrees
          Element 2 - °F °C
          Element 3 - 5/9 9/5
          Element 4 - °C °F

          dependent on the selection in the clip wizard.

          The ^!Info statement uses the ^%Switchn% syntax where n = the element number:
          (^%Switch1%^%Switch2% = ^$Calc((^%Switch1%+40)*^%Switch3%-40)$^%Switch4%)
          nn°F = ^$Calc((nn+40)*5/9-40)$°C
          (or) nn°C = ^$Calc((nn+40)*9/5-40)$°F

          I hope this helps some of you understand this more clearly.
          Charlie.

          Charles M. Raine Home Page: http://www.escape.ca/~rainec
          Phone (204) 895-0940 ICQ # 300058
          Winnipeg, Manitoba, Canada
        Your message has been successfully submitted and would be delivered to recipients shortly.