TGAL Manual
TGAL Procedures
Tailoring TGAL
4–10 060865 Tandem Computers Incorporated
TODAY Procedure The TODAY procedure sets the parameters that determine the standard format used
when you specify the TODAY option in the HEAD, SUBHEAD, and FOOT commands.
The TODAY command overrides this procedure on a document-by-document basis.
The month list must start and end with a comma. The list can contain up to 256
characters including the commas. In the TGALUPS file, the TODAY procedure is:
PROC TODAY(LEN,SEP,NAT,LIST); !
INT .LEN, ! T^SHORT:digits | T^LONG:spell out !
.NAT; ! T^USA:month 1st | T^WORLD:day 1st !
STRING .SEP, ! separator char for short form !
.LIST; ! List of 12 months !
BEGIN ! !
LEN := T^SHORT; ! use digits for month names !
SEP := "/"; ! slash for USA; period for WORLD !
NAT := T^USA; ! put month first (mm/dd/yy) !
! In this list of month names, !
! each name is preceded by a comma !
LIST ':='[",January,February,March,April,May,June", !and followed!
",July,August,September,October,November",!by a comma. !
",December,",0]; ! 12 in all. !
END; ! end of today procedure !
The exclamation points mark off the comments in the program. You change only the
lines marked with an arrow; for example:
PROC TODAY(LEN,NAT,LIST); ! !
INT .LEN, ! T^SHORT:digits | T^LONG:spell out!
.NAT; ! T^USA:month 1st | T^WORLD:day 1st!
STRING .SEP, ! separator char for short form !
.LIST; ! List of 12 months !
BEGIN ! !
LEN := T^LONG; ! spell out the month names !
SEP := "-"; ! hyphen for short (dd-mm-yy) !
NAT := T^WORLD; ! put day first, month second !
LIST ':='[",Janus,Februa,Mars,Aphro,Maia,Juno", !use these !
",Julius,Augustus,Septem,Octo,Novem", !month names !
",Decem,",0];
END; ! end of today procedure !