diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-17 10:31:17 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-17 10:31:17 -0700 |
commit | 1848b18f02b158861008214efd19708585bfcbe5 (patch) | |
tree | 3b5ddc0355f9b2b099156a668761cf45edefefb1 /cpp/036length | |
parent | 9da1b126cc017e14035b94c4615d211e5bc4bb21 (diff) | |
download | mu-1848b18f02b158861008214efd19708585bfcbe5.tar.gz |
1073 - stop fixing the values of primitive recipes
In the process I give up trace stability when I move files around, but I gain in exchange the ability to move files around.
Diffstat (limited to 'cpp/036length')
-rw-r--r-- | cpp/036length | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/036length b/cpp/036length index b9e3bc3c..9d3bb714 100644 --- a/cpp/036length +++ b/cpp/036length @@ -1,3 +1,5 @@ +//: Recipe to compute the length of an array. + :(scenario "array_length") recipe main [ 1:integer <- copy 3:literal @@ -9,12 +11,10 @@ recipe main [ +run: instruction main/4 +mem: storing 3 in location 5 -:(before "End Globals") -const int LENGTH = 31; +:(before "End Primitive Recipe Declarations") +LENGTH, :(before "End Primitive Recipe Numbers") Recipe_number["length"] = LENGTH; -assert(Next_recipe_number == LENGTH); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case LENGTH: { reagent x = canonize(instructions[pc].ingredients[0]); |