User Tools

Site Tools


jvs:cigal:manual:chapter2:execute

CIGAL Reference Manual, Chapter 2 (Commands): EXECUTE

EXECUTE -- Execute a character string as a CIGAL command line

usage: execute textstring

The EXECUTE command behaves as though its character string argument, TEXTSTRING, were typed in as the next command line, or group of command lines. This is most useful if you want to construct a command in a character string variable, or if you have several commands that you want to execute as a group. The latter is possible because the EXECUTE command stores the TEXTSTRING and breaks it into separate commands wherever it finds unquoted newline characters (\n, ASCII 10).

For example:

     exec cmdlin                         ; execute the DOS arguments to CIGAL
                                         ; as a CIGAL command
  or:
     s1 = {                              ; load the string variable S1 with
      s2 = accept('Enter command: ')     ; 4 command lines (separated by '\n'
      time(0)                            ; within S1) to read a command line
      exec s2                            ; and time its execution
      ftype 'Time: %.2f secs\n' time(1)  ;
     }
     execute s1                          ; Now read and time a command

See Also:
ALARM(2), STRINGS(1)

CIGAL Home, CIGAL Manual, Commands List, Manual Help

jvs/cigal/manual/chapter2/execute.txt · Last modified: 2023/02/23 18:43 (external edit)