diff options
Diffstat (limited to 'cpp/017compare')
-rw-r--r-- | cpp/017compare | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/cpp/017compare b/cpp/017compare index 45deab06..145feaa2 100644 --- a/cpp/017compare +++ b/cpp/017compare @@ -1,10 +1,8 @@ -:(before "End Globals") +:(before "End Primitive Recipe Declarations") // Comparison ops. -const int EQUAL = 13; +EQUAL, :(before "End Primitive Recipe Numbers") Recipe_number["equal"] = EQUAL; -assert(Next_recipe_number == EQUAL); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case EQUAL: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; @@ -46,12 +44,10 @@ recipe main [ +run: product 0 is 1 +mem: storing 1 in location 3 -:(before "End Globals") -const int GREATER_THAN = 14; +:(before "End Primitive Recipe Declarations") +GREATER_THAN, :(before "End Primitive Recipe Numbers") Recipe_number["greater-than"] = GREATER_THAN; -assert(Next_recipe_number == GREATER_THAN); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case GREATER_THAN: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; @@ -95,12 +91,10 @@ recipe main [ +run: product 0 is 0 +mem: storing 0 in location 3 -:(before "End Globals") -const int LESSER_THAN = 15; +:(before "End Primitive Recipe Declarations") +LESSER_THAN, :(before "End Primitive Recipe Numbers") Recipe_number["lesser-than"] = LESSER_THAN; -assert(Next_recipe_number == LESSER_THAN); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case LESSER_THAN: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; @@ -144,12 +138,10 @@ recipe main [ +run: product 0 is 0 +mem: storing 0 in location 3 -:(before "End Globals") -const int GREATER_OR_EQUAL = 16; +:(before "End Primitive Recipe Declarations") +GREATER_OR_EQUAL, :(before "End Primitive Recipe Numbers") Recipe_number["greater-or-equal"] = GREATER_OR_EQUAL; -assert(Next_recipe_number == GREATER_OR_EQUAL); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case GREATER_OR_EQUAL: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; @@ -207,12 +199,10 @@ recipe main [ +run: product 0 is 0 +mem: storing 0 in location 3 -:(before "End Globals") -const int LESSER_OR_EQUAL = 17; +:(before "End Primitive Recipe Declarations") +LESSER_OR_EQUAL, :(before "End Primitive Recipe Numbers") Recipe_number["lesser-or-equal"] = LESSER_OR_EQUAL; -assert(Next_recipe_number == LESSER_OR_EQUAL); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case LESSER_OR_EQUAL: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; |