From: Ben Pfaff Date: Fri, 31 Oct 2014 03:33:47 +0000 (-0700) Subject: Learned that 04 introduces the value of a string variable X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1862ebd5fc64ec2692b3a93fefbcf7cc091c0511;p=pspp Learned that 04 introduces the value of a string variable --- diff --git a/dump.c b/dump.c index d42580895e..e758a5b71b 100644 --- a/dump.c +++ b/dump.c @@ -204,6 +204,24 @@ dump_value(int level) match_u32_assert (2); match_byte (0); } + else if (match_byte (4)) + { + unsigned int format; + char *var, *vallab, *value; + + match_byte_assert (0x58); + format = get_u32 (); + vallab = get_string (); + var = get_string (); + match_byte_assert (2); + value = get_string (); + printf ("value \"%s\" format %d(%d.%d) var \"%s\" vallab \"%s\"", + value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab); + match_byte (0); + match_byte (0); + match_byte (0); + match_byte (0); + } else if (match_byte (1)) { unsigned int format; diff --git a/notes b/notes index 1a8c1234bb..b5267e5a83 100644 --- a/notes +++ b/notes @@ -459,8 +459,9 @@ Dimensions format: dd ww ff 00, e.g. F40.1 is 01 28 05 00 01 - double (01 58 format double) -02 - instance of a variable (02 58 format double "varname" "Variable Label") +02 - instance of a numeric variable (02 58 format double "varname" "Variable Label") 03 - just a string (03 "Short Name" 58 "identifier" "Long Name") +04 - instance of a string variable (04 58 format "vallab" "varname" 02 "value" 05 - variable (05 58 "varname" "Variable Label") @@ -861,6 +862,29 @@ web/1ae63a04381624dac939ac62eca63fec/00000000053_lightTableData.bin (descriptive ... +web/76e9b53e9f775fb690a88919ccdbb03c/000000001361_lightTableData.bin (crosstabs): + +i3 + +05 58 "marst" "Demographics - Marital Status" 02 00 00 i2 01 00 i1 00 i2 + 05 58 "marst" "Demographics - Marital Status" 02 00 00 i1 00 ff ff ff ff i4 + 04 58 00 03 01 00 "Single (never married)" "marst" 02 "A" 00 00 00 i2 00 00 00 00 00 00 00 00 + 04 58 00 03 01 00 "Married, living with spouse" "marst" 02 "B" 00 00 00 i2 i1 00 00 00 00 + 04 58 00 03 01 00 "Unmarried, living with partner" "marst" 02 "C" 00 00 00 i2 i2 00 00 00 00 + 04 58 00 03 01 00 "Divorced" "marst" 02 "E" 00 00 00 i2 i3 00 00 00 00 + 03 "Total" 58 "total_4" "Total" i1 i2 i4 00 00 00 00 + +05 58 "Gender_R" 00 00 00 00 02 00 00 i2 01 00 01 i1 i2 + 05 58 "Gender_R" 00 00 00 00 02 00 00 i1 00 ff ff ff ff i2 + 02 58 F40.0(0) "Gender_R" "Male" i2 i2 00 00 00 00 00 00 00 00 + 02 58 F40.0(1) "Gender_R" "Female" i2 i2 i1 00 00 00 00 + 03 "Total" 58 "total_4" "Total" i1 i2 i2 00 00 00 00 + +03 "Statistics" 58 "statistics_10" "Statistics" 01 00 01 i2 01 00 01 i2 i2 + 03 "Count" 58 "count_6" "Count" i1 i2 00 00 00 00 00 00 00 00 00 + 31 00 00 00 00 00 00 00 00 i26 i20 00 00 00 00 31 "col % of ^1" 58 58 "% within ^1" i1 00 00 00 00 + 05 58 "Gender_R" 00 00 00 00 i2 i2 i1 00 00 00 00 00 00 00 00 ... + Data: tdump21 (germano/Crosstabs.pdf) -------------