VARIABLE ROLE: Document the format and add a test.
[pspp] / doc / dev / system-file-format.texi
index e98b718883e1ef7507e48c4f39fdc0d19fd9198f..9bb636144030ea83c595a2ebd48a099192a61003 100644 (file)
@@ -831,8 +831,8 @@ Ordinal Scale
 Continuous Scale
 @end table
 
-SPSS 14 sometimes writes a @code{measure} of 0 for string variables.
-PSPP interprets this as nominal scale.
+SPSS sometimes writes a @code{measure} of 0.  PSPP interprets this as
+nominal scale.
 
 @item int32 width;
 The width of the display column for the variable in characters.
@@ -1189,6 +1189,32 @@ will contain a variable attribute record with the following contents:
 00000030  0a 29                                             |.)              |
 @end example
 
+@menu
+* Variable Roles::
+@end menu
+
+@node Variable Roles
+@subsection Variable Roles
+
+A variable's role is represented as an attribute named @code{$@@Role}.
+This attribute has a single element whose values and their meanings
+are:
+
+@table @code
+@item 0
+Input.  This, the default, is the most common role.
+@item 1
+Output.
+@item 2
+Both.
+@item 3
+None.
+@item 4
+Partition.
+@item 5
+Split.
+@end table
+
 @node Extended Number of Cases Record
 @section Extended Number of Cases Record
 
@@ -1253,7 +1279,9 @@ Record type.  Always set to 7.
 @item int32 subtype;
 Record subtype.  May take any value.  According to Aapi
 H@"am@"al@"ainen, value 5 indicates a set of grouped variables and 6
-indicates date info (probably related to USE).
+indicates date info (probably related to USE).  Subtype 24 appears to
+contain XML that describes how data in the file should be displayed
+on-screen.
 
 @item int32 size;
 Size of each piece of data in the data part.  Should have the value 1,