[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Help with TODAY



Reply to note from Harry Binswanger  Sun, 28 May
2006 21:21:52 -0400

Harry:

> TODAY works by hand, from the cm line, but it only puts the day
> of the week and a couple of spaces in when I call TODAY within
> a large [program].

Remember that TODAY takes an optional argument -- a date mask, e.g.,
m/d/yy -- which is passed to it via S/G 50. If and only if S/G 50
is empty or uninitialized, the argument defaults to the default date
mask (). But if S/G 50 has content, it is treated as the
requested date mask, no matter what it is. From your remarks I
infer that S/G 50 contains "a couple of spaces" when your program
launches TODAY; upon being filtered through the supplied mask, the
date is formatted as... a couple of spaces. If you want to pass the
default date mask to TODAY, you have to either zero out 50 ()
or poke the mask into it with > or 
or whatever.

Incidentally, AUTOHIDE is overkill here; it'll only slow your
program down and waste memory. The only S/G you need to shield from
overwriting by TODAY is 01 (JM 2.HIDE:01Q2 ). Also, remember that
every call to HIDE _must_ be balanced with a call to UNHIDE; if you
don't, you'll bolix up many U2 routines.

So your code should look something like this:

JM 2.HIDE:01Q2 JM 2.todayQ2 JM 2.UNHIDEQ2 ;*;

Or, in working code (issue DECODE to decode it):

XPLeNCODE v2.0
b-gin [UNTITLED]
[JM_]2.HIDE:01[Q2_]{<}SV50,{>}[JM_]2.today[Q2_][JM_]2.UNHIDE[
Q2_];*;
-nd
XPLeNCODE

This should help -- but if it doesn't, let me know.

--
Carl Distefano
cld@xxxxxxxx