|
Grouping Elements and Controlling InterpretationProgramming languages often use symbols such as braces, quotes, and parentheses to operate on selected elements as a group rather than individually. Similarly, dcecp uses " " (double-quotes) and { } (braces) to group elements into structures. Double quotes allow elements that would usually be parsed separately to be grouped and treated as a single element. Braces are used to group elements into a list so that dcecp can correctly parse commands and other data like return values. The dcecp command elements are separated by whitespace: the space, tab, and newline characters. The following dcecp command uses space characters to separate its three elements: dcecp> directory create /.:/subsys/comm_services Use either the newline character or the semicolon (;) to separate commands in a script. The following two examples which set and then use a variable are equivalent: dcecp> set a /.:/subsys/comm_services The choice to use braces or quotes to group elements together depends on how you want dcecp to interpret special characters like $, [, and {. While braces disable special interpretation of most of these characters, double quotes disable special interpretation of just a few. The backslash character (\) which we will see soon, offers another way to disable interpretation of special characters. When used together, braces, quotes, and backslashes offer lots of flexibility in composing dcecp command strings. More: |