From 4690ce81e079fc58cae8d6d583e5e3eb3ed81a83 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 9 Mar 2016 02:56:27 -0800 Subject: 2743 Looks like "TOhtml | " doesn't work on Mac OS X for some reason.. --- html/074random.cc.html | 48 ++++++++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 28 deletions(-) (limited to 'html/074random.cc.html') diff --git a/html/074random.cc.html b/html/074random.cc.html index dd525d58..5c01b4cf 100644 --- a/html/074random.cc.html +++ b/html/074random.cc.html @@ -3,45 +3,38 @@ Mu - 074random.cc - - + + - - + - - -
+
 :(before "End Primitive Recipe Declarations")
 RANDOM,
 :(before "End Primitive Recipe Numbers")
 put(Recipe_ordinal, "random", RANDOM);
 :(before "End Primitive Recipe Checks")
-case RANDOM: {
+case RANDOM: {
   break;
 }
 :(before "End Primitive Recipe Implementations")
-case RANDOM: {
+case RANDOM: {
   // todo: limited range of numbers, might be imperfectly random
   // todo: thread state in extra ingredients and products
   products.resize(1);
@@ -54,11 +47,11 @@ MAKE_RANDOM_NONDETERMINISTIC,
 :(before "End Primitive Recipe Numbers")
 put(Recipe_ordinal, "make-random-nondeterministic", MAKE_RANDOM_NONDETERMINISTIC);
 :(before "End Primitive Recipe Checks")
-case MAKE_RANDOM_NONDETERMINISTIC: {
+case MAKE_RANDOM_NONDETERMINISTIC: {
   break;
 }
 :(before "End Primitive Recipe Implementations")
-case MAKE_RANDOM_NONDETERMINISTIC: {
+case MAKE_RANDOM_NONDETERMINISTIC: {
   srand(time(NULL));
   break;
 }
@@ -68,26 +61,26 @@ ROUND,
 :(before "End Primitive Recipe Numbers")
 put(Recipe_ordinal, "round", ROUND);
 :(before "End Primitive Recipe Checks")
-case ROUND: {
-  if (SIZE(inst.ingredients) != 1) {
-    raise_error << maybe(get(Recipe, r).name) << "'round' requires exactly one ingredient, but got " << to_string(inst) << '\n' << end();
+case ROUND: {
+  if (SIZE(inst.ingredients) != 1) {
+    raise << maybe(get(Recipe, r).name) << "'round' requires exactly one ingredient, but got " << to_string(inst) << '\n' << end();
     break;
   }
-  if (!is_mu_number(inst.ingredients.at(0))) {
-    raise_error << maybe(get(Recipe, r).name) << "first ingredient of 'round' should be a number, but got " << inst.ingredients.at(0).original_string << '\n' << end();
+  if (!is_mu_number(inst.ingredients.at(0))) {
+    raise << maybe(get(Recipe, r).name) << "first ingredient of 'round' should be a number, but got " << inst.ingredients.at(0).original_string << '\n' << end();
     break;
   }
   break;
 }
 :(before "End Primitive Recipe Implementations")
-case ROUND: {
+case ROUND: {
   products.resize(1);
   products.at(0).push_back(rint(ingredients.at(0).at(0)));
   break;
 }
 
 :(scenario round_to_nearest_integer)
-recipe main [
+def main [
   1:number <- round 12.2
 ]
 +mem: storing 12 in location 1
@@ -97,4 +90,3 @@ recipe main [
 
- -- cgit 1.4.1-2-gfad0