HP3000-L Archives

June 2003, 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, 18 Jun 2003 17:20:19 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
...
> i'd consider doing:
>   :setvar myvar finfo('hkdata.datafile','intcreated')
>   :# change the integer into a string
>   :setvar myvar "!myvar"
>   :if myvar = hpyyyymmdd
>     [blah blah blah]
>   :endif
>
> jeff will probably point out some nifty one-liner for the
> above (:-) -- but it is readable :-)    - d

Just for fun and not trying to win any readability awards:
  if finfo('filename','intcreated') = !hpyyyymmdd then

which is what was originally written, I believe. The lack
of quotes around !HPYYYYMMDD forces the number to be treated
as an integer... recall that !varname causes the CI to
"forget" that var's type.  One could also write:
  if decimal(finfo('filename','intcreated')) = hpyyyymmdd then


FWIW,
  Jeff Vance, vCSY

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2