User Tools

Site Tools


jvs:cigal:manual:chapter2:curlybracket

CIGAL Reference Manual, Chapter 2 (Commands): CURLYBRACKET

CURLYBRACKET -- Mark the end of a block of conditional commands

usage:} or: } else {

        Use the '}' command in conjunction with a previous '{' command to mark the end of a block
of commands or data in a macro program, or to mark a block of data when used interactively.
When it is used, the '}' must be the first non-blank character on the line.  Generally, the
usage of '}' is fairly obvious; anywhere that you start something with a '{' you must
eventually finish it with a '}'.  The only special case is the ELSE construct:
                        } else {
which can be used between the "true" and "false" blocks of conditional
commands following an IF statement.  For example,
                        if(a > 100) {
                                type 'Large A:' a
                        } else {
                                a = 100
                        }

Note: The '{' and '}' characters are also used to specify an entry
number within a file containing more than one variable (see [VARIABLES][1]).
However, the syntax is so different between the two uses of these special
characters that there should never be any ambiguity about their meanings.

See Also:
ACCEPT(3), DATAENTRY(1), HELP(2), IF(2), TYPE(2), VARIABLES(1), WHILE(2)

CIGAL Home, CIGAL Manual, Commands List, Manual Help

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