Extending a Statement over Multiple Lines

There are times when, for the sake of readability, you want to extend a single statement over more than one line. One way to do this is with braces {}. When an "open brace", {, is encountered in a script file, Origin searches for a "closed brace" , }, and executes the entire block of text as one statement. For example, the following macro statement:

def openDialog {layer -s 1;  axis x;};

can also be written:

def openDialog {
                 layer -s 1; 
                 axis x;

Both scripts are executed as a single statement, even though the second statement spans multiple lines.

Note: There is a limit to the length of script that can be included between a set of braces {}. The scripts between the {} are translated internally and the translated scripts must be less than 1140 bytes (after substitution). In place of long blocks of LabTalk code, programmers can use LabTalk macros or the run.section() and run.file() object methods. To learn more, see Passing Arguments.