Accessing Time Data
Developing TACL Programs
107365 Tandem Computers Incorporated
2–17
To obtain input from a terminal, you can use #INPUTV, #SET, VINSERT, or
#APPEND. The following function calls wait for input and store the input into
variable
:
#INPUTV
variable prompt
#SET
variable [#INPUT prompt-text]
#APPEND
variable [#INPUT prompt-text]
In addition, you can use #REQUESTER to read from a terminal. For additional
information about these built-in functions and commands, see the TACL Reference
Manual.
Data Types
TACL does not support explicit data type definitions except in STRUCT variables. If
you need to determine the data type of variable contents, such as whether the first
constant in a variable is a number or a text constant, you can check to see if the type
matches one of the alternatives supported by the #ARGUMENT built-in function. You
can access a routine that contains an #ARGUMENT call from any type of procedural
variable. For more information, see “Processing Arguments” in Section 3,
“Developing TACL Routines.”
Accessing Time Data
The system clock keeps track of time as a numeric value known as a timestamp. TACL
supports timestamps in four formats for arithmetic operations, comparisons, and
display purposes.
Timestamp Formats
The four timestamp formats differ in content and form:
Julian timestamp, a four-word timestamp based on the Julian calendar. This
timestamp represents the number of microseconds since 12:00 January 1, 4713 B.C,
using Greenwich mean time (GMT). A GMT timestamp is stored as a four-word
timestamp; for example:
211479971400000000
The Julian date includes a Julian day number—the integral number of days since
January 1, 4713 B.C. The operating system assumes that the Julian day number
starts at midnight local or Greenwich mean time, depending on the base of the
timestamp.