X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fvariables.texi;h=1db8f034a66fc79c5334addb348e6baed606d92f;hb=refs%2Fheads%2Fpivot-table2;hp=f19581ac1a88098e093995a49d52dbfa96ea4e56;hpb=1b1837591924226078c96db15888b68beec2ef6d;p=pspp diff --git a/doc/variables.texi b/doc/variables.texi index f19581ac1a..1db8f034a6 100644 --- a/doc/variables.texi +++ b/doc/variables.texi @@ -23,6 +23,7 @@ several utility functions for examining and adjusting them. * VARIABLE ALIGNMENT:: Set the alignment for display. * VARIABLE WIDTH:: Set the display width. * VARIABLE LEVEL:: Set the measurement level. +* VARIABLE ROLE:: Set the role that a variable fills in analysis. * VECTOR:: Declare an array of variables. * WRITE FORMATS:: Set variable write formats. @end menu @@ -210,8 +211,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 +224,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 +472,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 @@ -618,6 +647,42 @@ VARIABLE LEVEL Currently, this has no effect except for certain third party software. +@node VARIABLE ROLE +@section VARIABLE ROLE +@vindex VARIABLE ROLE +@display +VARIABLE ROLE + /@var{role} @var{var_list} + [/@var{role} @var{var_list}]@dots{} +@end display + +@cmd{VARIABLE ROLE} sets the intended role of a variable for use in +dialog boxes in graphical user interfaces. Each @var{role} specifies +one of the following roles for the variables that follow it: + +@table @code +@item INPUT +An input variable, such as an independent variable. + +@item TARGET +An output variable, such as an dependent variable. + +@item BOTH +A variable used for input and output. + +@item NONE +No role assigned. (This is a variable's default role.) + +@item PARTITION +Used to break the data into groups for testing. + +@item SPLIT +No meaning except for certain third party software. (This role's +meaning is unrelated to @cmd{SPLIT FILE}.) +@end table + +The PSPPIRE GUI does not yet use variable roles as intended. + @node VECTOR @section VECTOR @vindex VECTOR @@ -664,5 +729,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.