From d009e158803956c76adbf8f58a62884c3e7affb3 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 26 Jan 2016 23:47:23 -0800 Subject: 2605 --- html/022arithmetic.cc.html | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'html/022arithmetic.cc.html') diff --git a/html/022arithmetic.cc.html b/html/022arithmetic.cc.html index 0a353d6d..f7e89060 100644 --- a/html/022arithmetic.cc.html +++ b/html/022arithmetic.cc.html @@ -137,6 +137,10 @@ case SUBTRACT: { products.at(0).push_back(result); break; } +:(code) +bool is_raw(const reagent& r) { + return has_property(r, "raw"); +} :(scenario subtract_literal) recipe main [ @@ -302,6 +306,9 @@ case DIVIDE_WITH_REMAINDER: { long long int b = static_cast<long long int>(ingredients.at(1).at(0)); if (b == 0) { raise_error << maybe(current_recipe_name()) << "divide by zero in '" << current_instruction().to_string() << "'\n" << end(); + products.resize(2); + products.at(0).push_back(0); + products.at(1).push_back(0); break; } long long int quotient = a / b; -- cgit 1.4.1-2-gfad0