HP3000-L Archives

January 2000, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"VANCE,JEFF (HP-Cupertino,ex1)" <[log in to unmask]>
Reply To:
VANCE,JEFF (HP-Cupertino,ex1)
Date:
Wed, 19 Jan 2000 15:10:28 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (25 lines)
...
> How do I keep the leading zero when I dereference the variable?

You need to ensure that the variable is treated as a string by the CI.
This can be done by enclosing it in quotes, or using it as a parameter
to any CI functions that expects a string.  E.g.
   :setvar x "0119"
   :calc typeof(x)
   2   %2   $2     <<string>>

   :setvar y x
   :calc typeof(y)
   2  <<still a string>>

   :setvar y !x
   :calc typeof(y)
   1  <<int>>

   :setvar y "!x"
   :calc typeof(y)
   2  <<string again>>

HTH,
Jeff Vance, CSY

ATOM RSS1 RSS2