Keywords: sic

Next: Specifying the .init File Up: Running Tasks Previous: Query Mode Contents Index

## EDIT Mode

Commands `RUN` and `SUBMIT` execute two SIC command procedures, the Initialization File `Task.init`, which defines all parameters needed for `example`, and the Checker File `Task.check`, which verifies that all parameters are valid. In the example above, the `example.init` file is

    TASK\INTEGER "An integer value"    I$
    TASK\REAL "A value between 0 and 1" A$
    TASK\CHARACTER "Any character string" CHAIN$
    TASK\REAL "4 Real values" ARRAY$[4]
    TASK\FILE "A valid file name" FILE$
    TASK\VALUES "Any values"  OLD$
    TASK\GO

This is a standard procedure containing commands of a SIC language named TASK. Commands from this language are used to define the parameters required by the task, and cannot be called interactively. The command syntax is always the same :

    TASK\Command "Prompt String" Parameter$[Dimensions] [Value [...]]

where

- `Command` indicates the type of parameter (`CHARACTER, FILE, INTEGER, LOGICAL, REAL`). A parameter of type `FILE` is a character string containing a valid file name. `VALUES` is intended to hold multiple values (which can be mathematical expression), without any prior on the number of values.
- `"Prompt String"` is a character string used as a prompt to ask for the parameter value(s)
- `Parameter$` is the parameter name
- `[Dimensions]` are the parameter dimensions, in case it is an array. Only `REAL` and `INTEGER` parameters may be arrays.
- `Value(s)` are the parameter values, an array requiring as many values as array elements.

Once all parameters have been assigned values, `RUN` and `SUBMIT` commands execute the `example.check` file, writing the current parameter values in an auxiliary file which will be used by the task `example`. If a parameter is incorrect, an error is returned, and the task `example` not executed.

Instead of supplying the parameters in a query mode, the user can use a text editor to edit the `.init` file using command

         VECTOR> RUN example /EDIT
    or
         VECTOR> SUBMIT example /EDIT

The parameter values can then be typed after the parameter names in the `example.init` file, using SIC continuation marks (``-'' as the last character of a line) if needed for long command lines. `example.init` will be executed after exiting the editor. If a parameter value is missing, the user will nevertheless be prompted for it after exiting the editor.

The text editor called is user defined by the command `SICSIC EDITOR` or the logical name `GAG_EDIT`.

Next: Specifying the .init File Up: Running Tasks Previous: Query Mode Contents Index