about summary refs log tree commit diff stats
path: root/cpp/018record
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-26 21:47:29 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-26 21:47:29 -0700
commit7e9c69251b700dbdec47dee47f37ba1194ad88e9 (patch)
tree9ba03cb52d5318f3f66de65887520ce92fc30345 /cpp/018record
parentf608504a44b9b47682f336f5b6357b8993d9bb0d (diff)
downloadmu-7e9c69251b700dbdec47dee47f37ba1194ad88e9.tar.gz
983 - arc 'integer-array' => c++ 'array:integer'
Diffstat (limited to 'cpp/018record')
-rw-r--r--cpp/018record6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/018record b/cpp/018record
index bdde8719..dba43a91 100644
--- a/cpp/018record
+++ b/cpp/018record
@@ -1,5 +1,4 @@
-//: Records are compound types with multiple elements of potentially different
-//: types.
+//: Records contain a fixed number of elements of different types.
 :(before "End Mu Types Initialization")
 //: We'll use this record as a running example, with two integer elements
 int point = Type_number["point"] = Next_type_number++;
@@ -47,7 +46,8 @@ recipe main [
 ]
 +mem: storing 36 in location 17
 
-:(before "End size_of Cases")
+:(before "End size_of(types) Cases")
+type_info t = Type[types[0]];
 if (t.is_record) {
   size_t result = 0;
   for (size_t i = 0; i < t.elements.size(); ++i) {