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

Re: [Clip] padding numbers

Expand Messages
  • Don Passenger
    looks like I may have repeated myself ... see http://groups.yahoo.com/group/ntb-clips/message/11161 where apparently Hugo answered about the same question once
    Message 1 of 4 , Oct 3, 2004
      looks like I may have repeated myself ...
      see http://groups.yahoo.com/group/ntb-clips/message/11161
      where apparently Hugo answered about the same question once before
      ^!If ^$StrSize("^%Field%")$=2 ^!Set %Field%=0^%Field%
      I can adapt that I think.

      Don Passenger wrote:
      snip
      > I have one problem, if the answer to my math problem is say 6.9 as in
      > 5:06.9, I need the zero padding to make it come out right.
      snip
    • Don Passenger
      Missing something simple here: ^!Set ^%seconds_per_mile_target%=6.9 ^!Info ^%seconds_per_mile_target% ^!Info ^$StrSize( ^%seconds_per_mile_target% )$ ^!If
      Message 2 of 4 , Oct 3, 2004
        Missing something simple here:

        ^!Set ^%seconds_per_mile_target%=6.9
        ^!Info ^%seconds_per_mile_target%
        ^!Info ^$StrSize("^%seconds_per_mile_target%")$
        ^!If ^$StrSize("^%seconds_per_mile_target%")$=3 ^!Set
        ^%seconds_per_mile_target%=0^%seconds_per_mile_target%
        ^!Info ^%seconds_per_mile_target%


        Is not working as I expect. I would think it would make 6.9 become 06.9
      • Hugo Paulissen
        ... [snip] ... 06.9 Don, Remove the ^ before the name of the variable when you set it. ^!Set ^%var% does not work, it should be ^!Set %var% Hugo
        Message 3 of 4 , Oct 4, 2004
          > Missing something simple here:
          >
          [snip]
          >
          > Is not working as I expect. I would think it would make 6.9 become
          06.9

          Don,

          Remove the ^ before the name of the variable when you set it.

          ^!Set ^%var% does not work, it should be
          ^!Set %var%

          Hugo
        Your message has been successfully submitted and would be delivered to recipients shortly.