X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fvariables.texi;h=f4ed4449dd52aeb713b8fb1959dceb63278b8c07;hb=6e6bbf7ae3f4b5f31784988df328ae5321842279;hp=f19581ac1a88098e093995a49d52dbfa96ea4e56;hpb=1b1837591924226078c96db15888b68beec2ef6d;p=pspp diff --git a/doc/variables.texi b/doc/variables.texi index f19581ac1a..f4ed4449dd 100644 --- a/doc/variables.texi +++ b/doc/variables.texi @@ -210,8 +210,8 @@ where @var{missing_values} takes one of the following forms: @var{string1} @var{string1}, @var{string2} @var{string1}, @var{string2}, @var{string3} -As part of a range, LO or LOWEST may take the place of @var{num1}; -HI or HIGHEST may take the place of @var{num2}. +As part of a range, @subcmd{LO} or @subcmd{LOWEST} may take the place of @var{num1}; +@subcmd{HI} or @subcmd{HIGHEST} may take the place of @var{num2}. @end display @cmd{MISSING VALUES} sets user-missing values for numeric and string @@ -223,7 +223,8 @@ Specify a list of variables, followed by a list of their user-missing values in parentheses. Up to three discrete values may be given, or, for numeric variables only, a range of values optionally accompanied by a single discrete value. Ranges may be open-ended on one end, indicated -through the use of the keyword LO or LOWEST or HI or HIGHEST. +through the use of the +keyword @subcmd{LO} or @subcmd{LOWEST} or @subcmd{HI} or @subcmd{HIGHEST}. The @cmd{MISSING VALUES} command takes effect immediately. It is not affected by conditional and looping constructs such as @cmd{DO IF} or @@ -470,18 +471,45 @@ already present. @vindex STRING @display -STRING /@var{var_list} (@var{fmt_spec}). +STRING @var{var_list} (@var{fmt_spec}) [/@var{var_list} (@var{fmt_spec})] [@dots{}]. @end display @cmd{STRING} creates new string variables for use in transformations. -Specify a slash (@samp{/}), followed by the names of the string -variables to create and the desired output format specification in -parentheses (@pxref{Input and Output Formats}). Variable widths are +Specify a list of names for the variable you want to create, +followed by the desired output format specification in +parentheses (@pxref{Input and Output Formats}). +Variable widths are implicitly derived from the specified output formats. +The created variables will be initialized to spaces. + +If you want to create several variables with distinct +output formats, you can either use two or more separate @cmd{STRING} commands, +or you can specify further variable list and format specification pairs, each separated +from the previous by a slash (@samp{/}). + +The following example is one way to create three string variables; Two of the +variables have format A24 and the other A80: +@example +STRING firstname lastname (A24) / address (A80). +@end example + +@noindent Here is another way to achieve the same result: +@example +STRING firstname lastname (A24). +STRING address (A80). +@end example + +@noindent @dots{} and here is yet another way: + +@example +STRING firstname (A24). +STRING lastname (A24). +STRING address (A80). +@end example + -Created variables are initialized to spaces. @node VARIABLE ATTRIBUTE @@ -664,5 +692,5 @@ WRITE FORMATS @var{var_list} (@var{fmt_spec}) [@var{var_list} (@var{fmt_spec})]@ @cmd{WRITE FORMATS} sets the write formats for the specified variables to the specified format specification. Its syntax is identical to -that of FORMATS (@pxref{FORMATS}), but @cmd{WRITE FORMATS} sets only +that of @cmd{FORMATS} (@pxref{FORMATS}), but @cmd{WRITE FORMATS} sets only write formats, not print formats.