| iMatix home page
| Libero home page | Libero documentation
| << | < | > | >>
Libero Libero
Version 2.32

Syntax Of Logical Conditions

The :if and :do while commands output some code depending on a logical-condition. Some examples:

:if $debug
:  echo "version is $version"
:endif
:do while $counter > 0
   ...
:enddo

A logical condition has two possible forms:

:if [not] [test] expr1 [logical_operator expr2]
:while [not] [test] expr1 [logical_operator expr2]

:if [not] [standard_test]
:while [not] [standard_test]

Logical Operators

You can make a condition by comparing two expressions. The 'test' keyword is optional and I normally don't use it. The expressions can be numeric or string; if either is a string, Libero treats both as strings. The logical operator can be one of:

These are the logical operators:

Standard Tests

Libero provides these standard tests:

exist filename
filename exists in the current directory.
animate
The dialog uses the -animation option.
check
The dialog uses the -check option.
caps
The dialog uses the -style=caps option.
cobol
The dialog uses the -style=cobol option.
headline
The dialog uses the -style=headline option.
normal
The dialog uses the -style=normal option.
plain
The dialog uses the -style=plain option.
title
The dialog uses the -style=title option.
defaults
The dialog defines a Defaults state.
state name
name is a state in the dialog.
event name
name is an event in the dialog.
module name
name is a module in the dialog.

| << | < | > | >>
| Libero Technical Reference | Read-Only Variables | Schema Commands | Syntax Of Expressions | Syntax Of Logical Conditions | Control Variables | Standard :do Conditions | Extra Variables In A :do Loop | General Rules for Code Generation | Generating Module Stubs | Generating COBOL Code | The State Machine Algorithm | Compiled-In Limitations | Quick Reference - Libero Schema Language
iMatix
Copyright © 1996-97 iMatix