From: Ben Pfaff Date: Wed, 7 May 2025 15:03:59 +0000 (-0700) Subject: work on manual X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a10009d5d4648f08fc4e133ac8862c8882c7dc26;p=pspp work on manual --- diff --git a/rust/doc/src/SUMMARY.md b/rust/doc/src/SUMMARY.md index e8ac7750e6..3a08d45935 100644 --- a/rust/doc/src/SUMMARY.md +++ b/rust/doc/src/SUMMARY.md @@ -37,6 +37,7 @@ - [Time and Date Functions](language/expressions/functions/time-and-date.md) - [Miscellaneous Functions](language/expressions/functions/miscellaneous.md) - [Statistical Distribution Functions](language/expressions/functions/statistical-distributions.md) + - [System Variables](language/expressions/system-variables.md) # Command Syntax @@ -74,6 +75,8 @@ - [ADD FILES](commands/combining/add-files.md) - [MATCH FILES](commands/combining/match-files.md) - [UPDATE](commands/combining/update.md) +- [Manipulating Variables](commands/variables/index.md) + - [DISPLAY](commands/variables/display.md) # Developer Documentation diff --git a/rust/doc/src/commands/variables/display.md b/rust/doc/src/commands/variables/display.md new file mode 100644 index 0000000000..78b5e42ebb --- /dev/null +++ b/rust/doc/src/commands/variables/display.md @@ -0,0 +1,65 @@ +# DISPLAY + +The `DISPLAY` command displays information about the variables in the +active dataset. A variety of different forms of information can be +requested. By default, all variables in the active dataset are +displayed. However you can select variables of interest using the +`/VARIABLES` subcommand. + +``` +DISPLAY [SORTED] NAMES [[/VARIABLES=]VAR_LIST]. +DISPLAY [SORTED] INDEX [[/VARIABLES=]VAR_LIST]. +DISPLAY [SORTED] LABELS [[/VARIABLES=]VAR_LIST]. +DISPLAY [SORTED] VARIABLES [[/VARIABLES=]VAR_LIST]. +DISPLAY [SORTED] DICTIONARY [[/VARIABLES=]VAR_LIST]. +DISPLAY [SORTED] SCRATCH [[/VARIABLES=]VAR_LIST]. +DISPLAY [SORTED] ATTRIBUTES [[/VARIABLES=]VAR_LIST]. +DISPLAY [SORTED] @ATTRIBUTES [[/VARIABLES=]VAR_LIST]. +DISPLAY [SORTED] VECTORS. +``` + +The following keywords primarily cause information about variables to +be displayed. With these keywords, by default information is +displayed about all variable in the active dataset, in the order that +variables occur in the active dataset dictionary. The `SORTED` +keyword causes output to be sorted alphabetically by variable name. + +* `NAMES` + The variables' names are displayed. + +* `INDEX` + The variables' names are displayed along with a value describing + their position within the active dataset dictionary. + +* `LABELS` + Variable names, positions, and variable labels are displayed. + +* `VARIABLES` + Variable names, positions, print and write formats, and missing + values are displayed. + +* `DICTIONARY` + Variable names, positions, print and write formats, missing values, + variable labels, and value labels are displayed. + +* `SCRATCH` + Variablenames are displayed, for scratch variables only (*note + Scratch Variables::). + +* `ATTRIBUTES` + Datafile and variable attributes are displayed, except attributes + whose names begin with `@` or `$@`. + + +* `@ATTRIBUTES` + All datafile and variable attributes, even those whose names begin + with `@` or `$@`. + +With the `VECTOR` keyword, `DISPLAY` lists all the currently declared +vectors. If the `SORTED` keyword is given, the vectors are listed in +alphabetical order; otherwise, they are listed in textual order of +definition within the PSPP syntax file. + +For related commands, see *note DISPLAY DOCUMENTS:: and *note DISPLAY +FILE LABEL::. + diff --git a/rust/doc/src/commands/variables/index.md b/rust/doc/src/commands/variables/index.md new file mode 100644 index 0000000000..1dc0d73b5c --- /dev/null +++ b/rust/doc/src/commands/variables/index.md @@ -0,0 +1,8 @@ +# Manipulating Variables + +Every value in a dataset is associated with a +[variable](../../language/datasets/variables.md). Variables describe +what the values represent and properties of those values, such as the +format in which they should be displayed, whether they are numeric or +alphabetic and how missing values should be represented. There are +several utility commands for examining and adjusting variables. diff --git a/rust/doc/src/language/expressions/system-variables.md b/rust/doc/src/language/expressions/system-variables.md new file mode 100644 index 0000000000..1be74603f0 --- /dev/null +++ b/rust/doc/src/language/expressions/system-variables.md @@ -0,0 +1,33 @@ +# System Variables + +The system variables described below may be used only in expressions. + +* `$CASENUM` + Case number of the case being processed. This changes as cases are + added, deleted, and reordered. + +* `$DATE` + Date the PSPP process was started, in format `A9`, following the + pattern `DD-MMM-YY`. + +* `$DATE11` + Date the PSPP process was started, in format `A11`, following the + pattern `DD-MMM-YYYY`. + +* `$JDATE` + Number of days between 15 Oct 1582 and the time the PSPP process + was started. + +* `$LENGTH` + Page length, in lines, in format `F11`. + +* `$SYSMIS` + System missing value, in format `F1`. + +* `$TIME` + Number of seconds between midnight 14 Oct 1582 and the time the + active dataset was read, in format `F20`. + +* `$WIDTH` + Page width, in characters, in format `F3`. +