The syntax for referring to a typed structure member using the "." operator is:
|
For example, given the structure type tm and function localtime defined as in the example on page ***, the following code obtains the system date and displays the time:
dcl Daterec type tm;
dcl ltime type time_t;
dcl ptime handle tm;
ltime = time( null() );
ptime = localtime( ltime );
Daterec = ptime => tm;
display ( edit(Daterec.Hours,'99') || ':' ||
edit(Daterec.Minutes,'99') || ':' ||
edit(Daterec.Seconds,'99'));