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

[Clip] Re: ^%val% vs. %val%

Expand Messages
  • RS
    Hi Stephen, ^%MyVar% gives you the VALUE (the CONTENT) of the variable. %MyVar% gives you the NAME of the variable (i.e. MyVar ). This format is only used in
    Message 1 of 2 , May 16, 1999
    • 0 Attachment
      Hi Stephen,

      ^%MyVar% gives you the VALUE (the CONTENT) of the variable.

      %MyVar% gives you the NAME of the variable (i.e. "MyVar"). This format is
      only used in ^!Set declarations (e.g. "^!Set %MyVar%=1").


      There is a glitch in the Clip, though: ANY number you enter will be
      considered Hexadecimal. The Dec to Hex part never gets executed! That's
      because the regular numbers are also part of the hexa.

      You'll need to implement some kind of convention, like adding an "h" after
      a Hexadecimal number, so your Clip can tell the difference. The code then
      should look for it and filter it out.



      Regards,


      RS


      ======================================================

      Have you ever dreamed of...
      a Professional Clip Editor for NoteTab?

      Coming soon:

      ClipWriter.

      http://home.att.net/~ptools/main/index.htm




      ======================================================







      ======================================================

      ------------------------------------------------------------------------
      eGroup home: http://www.eGroups.com/group/ntb-clips
      http://www.eGroups.com - Simplifying group communications
    • Stephen
      Hello: In the following clip-ette, if in line 3 I have ^!IfTrue ^$IsHex(^%val%)$ NEXT ELSE Dec, whatever value I enter (hex or decimal) the clip returns the
      Message 2 of 2 , May 16, 1999
      • 0 Attachment
        Hello:

        In the following clip-ette, if in line 3 I have ^!IfTrue
        ^$IsHex(^%val%)$ NEXT ELSE Dec, whatever value I enter (hex or decimal)
        the clip returns the Info box labelled "Hex = Dec". If instead I have
        !IfTrue ^$IsHex(%val%)$ NEXT ELSE Dec, whatever value I enter the clip
        returns the info box labelled "Dec = Hex".

        The diiference in the two cases is the ^ in ^$IsHex(^%val%)

        Aside from my clip not working as I think it should I'm intrigued about
        the ^

        Ideas, explanations?

        regards,
        Stephen




        H="Hex/Dec"
        ^!SetWizardLabel "Enter Hex or Dec value"
        ^!Set %val%=^?{=^%val%}
        ^!IfTrue ^$IsHex(^%val%)$ NEXT ELSE Dec
        ^!SetWizardTitle "Hex = Dec"
        ^!Info ^%val% = ^$HexToInt(^%val%)$
        ^!GoTo End
        :Dec
        ^!SetWizardTitle "Dec = Hex"
        ^!Info ^%val% = ^$IntToHex(^%val%)$

        ------------------------------------------------------------------------
        eGroup home: http://www.eGroups.com/group/ntb-clips
        http://www.eGroups.com - Simplifying group communications
      Your message has been successfully submitted and would be delivered to recipients shortly.