about summary refs log tree commit diff stats
path: root/021check_instruction.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-08 01:30:14 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-03-08 01:46:47 -0800
commit1ead356219bb2eb59487d1012f837bd07ec336f5 (patch)
treeaf15f390b81e4d6b3e0940c5756a0d7fd1060bb5 /021check_instruction.cc
parent27ba0937a3747684f299bb7a8b3cdd0fbb689db3 (diff)
downloadmu-1ead356219bb2eb59487d1012f837bd07ec336f5.tar.gz
2735 - define recipes using 'def'
I'm dropping all mention of 'recipe' terminology from the Readme. That
way I hope to avoid further bike-shedding discussions while I very
slowly decide on the right terminology with my students.

I could be smarter in my error messages and use 'recipe' when code uses
it and 'function' otherwise. But what about other words like ingredient?
It would all add complexity that I'm not yet sure is worthwhile. But I
do want separate experiences for veteran programmers reading about Mu on
github and for people learning programming using Mu.
Diffstat (limited to '021check_instruction.cc')
-rw-r--r--021check_instruction.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/021check_instruction.cc b/021check_instruction.cc
index d5463fda..9200e5b8 100644
--- a/021check_instruction.cc
+++ b/021check_instruction.cc
@@ -46,34 +46,34 @@ void check_instruction(const recipe_ordinal r) {
 
 :(scenario copy_checks_reagent_count)
 % Hide_errors = true;
-recipe main [
+def main [
   1:number <- copy 34, 35
 ]
 +error: ingredients and products should match in '1:number <- copy 34, 35'
 
 :(scenario write_scalar_to_array_disallowed)
 % Hide_errors = true;
-recipe main [
+def main [
   1:array:number <- copy 34
 ]
 +error: main: can't copy 34 to 1:array:number; types don't match
 
 :(scenario write_scalar_to_array_disallowed_2)
 % Hide_errors = true;
-recipe main [
+def main [
   1:number, 2:array:number <- copy 34, 35
 ]
 +error: main: can't copy 35 to 2:array:number; types don't match
 
 :(scenario write_scalar_to_address_disallowed)
 % Hide_errors = true;
-recipe main [
+def main [
   1:address:number <- copy 34
 ]
 +error: main: can't copy 34 to 1:address:number; types don't match
 
 :(scenario write_address_to_number_allowed)
-recipe main [
+def main [
   1:address:number <- copy 12/unsafe
   2:number <- copy 1:address:number
 ]
@@ -81,7 +81,7 @@ recipe main [
 $error: 0
 
 :(scenario write_boolean_to_number_allowed)
-recipe main [
+def main [
   1:boolean <- copy 1/true
   2:number <- copy 1:boolean
 ]
@@ -89,7 +89,7 @@ recipe main [
 $error: 0
 
 :(scenario write_number_to_boolean_allowed)
-recipe main [
+def main [
   1:number <- copy 34
   2:boolean <- copy 1:number
 ]