supportlink 8.4
pickerij@norbord.com
pickerij@norbord.com
Wed, 21 Oct 1998 11:24:01 -0500
Bob - please annotate and forward to Rosie Stipic
Rosie - you may consider this a letter to the editor
On page 55 of the recently delivered Supportlink vol. 8 number 4 there is
a Quiz example suggesting two methods to set a report file name uniquely
based on the date. I have a couple of comments regarding the examples
given.
In the first example you have the following:
...
>define thisdate date = sysdate
>define today num*2 = dateextract(thisdate,day)
>define month num*2 = dateextract(thisdate,month)
>define part-2 char*6 = pack("T" + ascii(today) + ascii(month))
...
The preamble to the example indicates that the file name ("part-2") would
be T2002 for Feb. 20. The above code would generate a file name of T202
for Feb. 20. The same problem would exist for any other single digit days
or months. The correct code should read:
>define part-2 char*6 = pack("T" + ascii(today,2) + ascii(month,2))
In the second example you have the following:
...
>define today char*2 = zerofill((ascii(sysdate))[7:2])
...
What possible use is the zerofill function? The ascii function will
always return an eight character string (assuming century included). The
substring function will always extract two characters. While the use of
the zerofill function will not result in incorrect results in this case,
it does seem superfluous.
More careful vetting of the examples would improve the quality and
usefulness of the publication.
Regards,
John Pickering
JWP Systems Inc.
Toronto
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.