diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-08-07 12:18:09 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-08-07 12:18:09 -0700 |
commit | 49659e7291dfa02f1b11db721fd80eddbeb19876 (patch) | |
tree | 857e565357823f5e40fc6afb585f51c27e319db5 | |
parent | eaeb955212eb3b133fd98d98457f17bfea8891d1 (diff) | |
download | mu-49659e7291dfa02f1b11db721fd80eddbeb19876.tar.gz |
1950
-rw-r--r-- | 032array.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/032array.cc b/032array.cc index 54e69e79..ab519477 100644 --- a/032array.cc +++ b/032array.cc @@ -41,14 +41,14 @@ recipe main [ :(before "End size_mismatch(x) Cases") if (x.types.at(0) == Type_ordinal["array"]) return false; :(before "End size_of(reagent) Cases") - if (r.types.at(0) == Type_ordinal["array"]) { - if (SIZE(r.types) == 1) { - raise << current_recipe_name() << ": '" << r.original_string << "' is an array of what?\n" << end(); - return 1; - } - // skip the 'array' type to get at the element type - return 1 + Memory[r.value]*size_of(array_element(r.types)); +if (r.types.at(0) == Type_ordinal["array"]) { + if (SIZE(r.types) == 1) { + raise << current_recipe_name() << ": '" << r.original_string << "' is an array of what?\n" << end(); + return 1; } + // skip the 'array' type to get at the element type + return 1 + Memory[r.value]*size_of(array_element(r.types)); +} //:: To access elements of an array, use 'index' |