Statements

A statement causes Uniface to execute the specified action. Statements can be used to, for example, activate a component, perform database I/O, or call another ProcScript module.

The general format of a ProcScript statement is:

Statement{/Qualifier1/Qualifiern} {Argument1,Argumentn}

where:

  • Statement—specifies the literal name of a Uniface ProcScript Statement
  • Qualifier—specifies the literal name of a switch, specific for Statement. Switches control the way ProcScript statements behave.
  • Argument—specifies an expression of which the result is passed as argument to the statement. For example, string arguments can be a literal string, or field, variable, function, or parameter that evaluates to a string.

Examples of ProcScript statements are:

  • activate "DOCUMENT_LIST"
  • retrieve/e "DOCUMENT"
  • store
  • scan $string$, "search me"

For more information, see ProcScript: Statements.

Return Values

ProcScript statements do not directly return a value; instead they set the following functions:

  • $status—execution result for all statements.

    For Uniface statements, $status contains zero or a positive value, if execution of the statement succeeded, and a negative value, if it failed. The exact meaning of the value in $status varies per statement. (For operations and entries, $status contains the value as returned by the ProcScript module.)

  • $procerror—execution result of the statement. $procerror contains zero, if execution of the statement succeeded, and a negative value if it failed. The exact meaning of the value in $procerror varies per statement.
  • $result—return value of statements.

    A number of Uniface statements, such as scan, uppercase, and filebox, put the result of the statement in $result. The exact meaning of the value in $result varies per statement.

Related Topics