Chapter Contents |
Previous |
Next |
WAIT |
Category: | Control Flow and Utility |
Syntax | |
Details | |
Example |
Syntax |
CALL WAIT(seconds); |
Type: Numeric
Details |
You can also use WAIT to allow the screen to refresh before performing another task.
Example |
Wait for 4.5 seconds between the times stored in TIME1 and TIME2, and then display those values in the LOG window:
time1 = datetime(); call wait( 4.5 ); time2 = datetime(); diff=putn((time2-time1),'4.1'); put time1= time2= diff=;
Take the last three digits before and after the decimal point from the two times: TIME1=872.229 and TIME2=876.749. Subtracting TIME2 from TIME1 results in 4.52 seconds total wait time.
time1=1069234872.22999 time2=1069234876.74999 diff=4.5
Create numeric text entry controls named START and FINISH and assign the format DATETIME20.2 to them. Enter the following program in the frame's SCL entry:
init: start.text=datetime(); call wait(3.1); finish.text=datetime(); return;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.