dump: Another way to express substitution?
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 31 Oct 2014 04:54:58 +0000 (21:54 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 31 Oct 2014 04:54:58 +0000 (21:54 -0700)
dump.c
notes

diff --git a/dump.c b/dump.c
index 7994db13c19517bb33a66c5a71586f48d8722b2e..0a92002672de550e728b21e251850807d6ff87f9 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -152,6 +152,7 @@ dump_value(int level)
   for (int i = 0; i <= level; i++)
     printf ("    ");
 
+  match_byte (0);
   if (match_byte (3))
     {
       get_string();
@@ -255,13 +256,11 @@ dump_value(int level)
       match_byte (0);
       match_byte (1);
     }
-  else
+  else if (match_byte (0x31))
     {
       int subn;
       int total_subs = 1;
 
-      match_byte (0);
-      match_byte_assert (0x31);
       match_u32_assert (0);
       match_u32_assert (0);
       subn = get_u32 ();
@@ -277,6 +276,27 @@ dump_value(int level)
           total_subs *= n_subst;
         }
 
+      for (int i = 0; i < total_subs; i++)
+        {
+          putc ('\n', stdout);
+          dump_value (level + 1);
+        }
+    }
+  else
+    {
+      int total_subs = 1;
+
+      match_byte_assert (0x58);
+      printf ("\"%s\" with substitutions:", get_string());
+      for (;;)
+        {
+          int n_subst = get_u32();
+          if (!n_subst)
+            break;
+          printf (" %d", n_subst);
+          total_subs *= n_subst;
+        }
+
       for (int i = 0; i < total_subs; i++)
         {
           putc ('\n', stdout);
diff --git a/notes b/notes
index 124b9b502df3975ef53c6156369911a703872b4c..0490e6e2cd5a999ae2c71620d362d7267d788cb0 100644 (file)
--- a/notes
+++ b/notes
@@ -955,6 +955,24 @@ web/6c3246ad09f0f6434a33b91c731636a3/00000000062_lightTableData.bin (descriptive
        05 58 "TOMS_General" 00 00 00 00 i2 i2 i14 00 00 00 00
         03 "" 58 "" "" i0                   i2 i15 i0 i0 
 
+web/17936f440753fa5f6771e084c26a1724/00000000033_lightTableData.bin (Paired Samples Statistics):
+
+    i2
+
+    03 "Variables" 58 "variable_s_1" "Variables" 01 00 00 i2 01 00 i1 00 i2 00
+       58 "Pair ^1" i1 00 00 00 00
+           01 58 F40.0(1) 00 00 01 i2 i-1 i2
+       05 58 "related" "related" i2 i2 00 00 00 00 00 00 00 00
+       05 58 "unrelated" "unrelated" i2 i2 i1 00 00 00 00 00 58 "Pair ^1" i1 00 00 00 00
+    01 58 F40.0(2) 00 00 01 i2 i-1 i2
+       05 58 "nwrelated" "related" i2 i2 i2 00 00 00 00
+       05 58 "nwunrelated" "unrelated" i2 i2 i3 00 00 00 00
+
+    03 "Statistics" 58 "statistics_10" "Statistics" 01 00 01 i2 01 00 01 i1 i4
+       03 "Mean" 58 "mean" "Mean" i1 i2 00 00 00 00 00 00 00 00
+       03 "N" 58 "n" "N" i1 i2 i1 00 00 00 00
+       03 "Std. Deviation" 58 "gbar11" "Std. Deviation" i1 i2 i2 00 00 00 00
+       03 "Std. Error Mean" 58 "gfreq13" "Std. Error Mean" i1 i2 i3 00 00 00 00
 
 Data: tdump21 (germano/Crosstabs.pdf)
 -------------