diff options
Diffstat (limited to 'cpp/013arithmetic')
-rw-r--r-- | cpp/013arithmetic | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/013arithmetic b/cpp/013arithmetic index d1d61eed..846fdff3 100644 --- a/cpp/013arithmetic +++ b/cpp/013arithmetic @@ -3,6 +3,7 @@ const int ADD = 2; :(before "End Primitive Recipe Numbers") Recipe_number["add"] = ADD; +assert(Next_recipe_number == ADD); Next_recipe_number++; :(before "End Primitive Recipe Implementations") case ADD: { @@ -47,6 +48,7 @@ recipe main [ const int SUBTRACT = 3; :(before "End Primitive Recipe Numbers") Recipe_number["subtract"] = SUBTRACT; +assert(Next_recipe_number == SUBTRACT); Next_recipe_number++; :(before "End Primitive Recipe Implementations") case SUBTRACT: { @@ -91,6 +93,7 @@ recipe main [ const int MULTIPLY = 4; :(before "End Primitive Recipe Numbers") Recipe_number["multiply"] = MULTIPLY; +assert(Next_recipe_number == MULTIPLY); Next_recipe_number++; :(before "End Primitive Recipe Implementations") case MULTIPLY: { @@ -136,6 +139,7 @@ recipe main [ const int DIVIDE = 5; :(before "End Primitive Recipe Numbers") Recipe_number["divide"] = DIVIDE; +assert(Next_recipe_number == DIVIDE); Next_recipe_number++; :(before "End Primitive Recipe Implementations") case DIVIDE: { @@ -181,6 +185,7 @@ recipe main [ const int DIVIDE_WITH_REMAINDER = 6; :(before "End Primitive Recipe Numbers") Recipe_number["divide_with_remainder"] = DIVIDE_WITH_REMAINDER; +assert(Next_recipe_number == DIVIDE_WITH_REMAINDER); Next_recipe_number++; :(before "End Primitive Recipe Implementations") case DIVIDE_WITH_REMAINDER: { |