about summary refs log tree commit diff stats
path: root/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/001-editor.mu10
-rw-r--r--sandbox/004-programming-environment.mu14
-rw-r--r--sandbox/005-sandbox.mu16
-rw-r--r--sandbox/008-sandbox-test.mu6
-rw-r--r--sandbox/009-sandbox-trace.mu2
-rw-r--r--sandbox/010-warnings.mu4
6 files changed, 26 insertions, 26 deletions
diff --git a/sandbox/001-editor.mu b/sandbox/001-editor.mu
index c74e6ac4..f84e388a 100644
--- a/sandbox/001-editor.mu
+++ b/sandbox/001-editor.mu
@@ -1,6 +1,6 @@
 ## the basic editor data structure, and how it displays text to the screen
 
-# temporary main for this layer: just render the given string at the given
+# temporary main for this layer: just render the given text at the given
 # screen dimensions, then stop
 recipe! main text:address:array:character [
   local-scope
@@ -13,7 +13,7 @@ recipe! main text:address:array:character [
   close-console
 ]
 
-scenario editor-initially-prints-string-to-screen [
+scenario editor-initially-prints-text-to-screen [
   assume-screen 10/width, 5/height
   run [
     1:address:array:character <- new [abc]
@@ -47,7 +47,7 @@ container editor-data [
 # creates a new editor widget and renders its initial appearance to screen
 #   top/left/right constrain the screen area available to the new editor
 #   right is exclusive
-recipe new-editor s:address:array:character, screen:address:screen, left:number, right:number -> result:address:editor-data [
+recipe new-editor s:address:array:character, screen:address:screen, left:number, right:number -> result:address:editor-data, screen:address:screen [
   local-scope
   load-ingredients
   # no clipping of bounds
@@ -224,13 +224,13 @@ recipe render screen:address:screen, editor:address:editor-data -> last-row:numb
   reply row, column, screen/same-as-ingredient:0, editor/same-as-ingredient:1
 ]
 
-recipe clear-line-delimited screen:address:screen, column:number, right:number [
+recipe clear-line-delimited screen:address:screen, column:number, right:number -> screen:address:screen [
   local-scope
   load-ingredients
   {
     done?:boolean <- greater-than column, right
     break-if done?
-    print-character screen, 32/space
+    screen <- print-character screen, 32/space
     column <- add column, 1
     loop
   }
diff --git a/sandbox/004-programming-environment.mu b/sandbox/004-programming-environment.mu
index 353502fe..c9cb020a 100644
--- a/sandbox/004-programming-environment.mu
+++ b/sandbox/004-programming-environment.mu
@@ -32,7 +32,7 @@ recipe new-programming-environment screen:address:screen, initial-sandbox-conten
   assert button-on-screen?, [screen too narrow for menu]
   screen <- move-cursor screen, 0/row, button-start
   run-button:address:array:character <- new [ run (F4) ]
-  print-string screen, run-button, 255/white, 161/reddish
+  print screen, run-button, 255/white, 161/reddish
   # sandbox editor
   current-sandbox:address:address:editor-data <- get-address *result, current-sandbox:offset
   *current-sandbox <- new-editor initial-sandbox-contents, screen, 0, width/right
@@ -165,7 +165,7 @@ recipe render-all screen:address:screen, env:address:programming-environment-dat
   assert button-on-screen?, [screen too narrow for menu]
   screen <- move-cursor screen, 0/row, button-start
   run-button:address:array:character <- new [ run (F4) ]
-  print-string screen, run-button, 255/white, 161/reddish
+  print screen, run-button, 255/white, 161/reddish
   #
   screen <- render-sandbox-side screen, env
   <render-components-end>
@@ -200,9 +200,9 @@ recipe update-cursor screen:address:screen, current-sandbox:address:editor-data
   screen <- move-cursor screen, cursor-row, cursor-column
 ]
 
-# print a string 's' to 'editor' in 'color' starting at 'row'
+# print a text 's' to 'editor' in 'color' starting at 'row'
 # clear rest of last line, move cursor to next line
-recipe render-string screen:address:screen, s:address:array:character, left:number, right:number, color:number, row:number -> row:number, screen:address:screen [
+recipe render screen:address:screen, s:address:array:character, left:number, right:number, color:number, row:number -> row:number, screen:address:screen [
   local-scope
   load-ingredients
   reply-unless s
@@ -260,8 +260,8 @@ recipe render-string screen:address:screen, s:address:array:character, left:numb
   move-cursor screen, row, left
 ]
 
-# like 'render-string' but with colorization for comments like in the editor
-recipe render-code-string screen:address:screen, s:address:array:character, left:number, right:number, row:number -> row:number, screen:address:screen [
+# like 'render' for texts, but with colorization for comments like in the editor
+recipe render-code screen:address:screen, s:address:array:character, left:number, right:number, row:number -> row:number, screen:address:screen [
   local-scope
   load-ingredients
   reply-unless s
@@ -278,7 +278,7 @@ recipe render-code-string screen:address:screen, s:address:array:character, left
     done? <- greater-or-equal row, screen-height
     break-if done?
     c:character <- index *s, i
-    <character-c-received>  # only line different from render-string
+    <character-c-received>  # only line different from render
     {
       # at right? wrap.
       at-right?:boolean <- equal column, right
diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu
index 63d86fb6..0ebd079e 100644
--- a/sandbox/005-sandbox.mu
+++ b/sandbox/005-sandbox.mu
@@ -177,7 +177,7 @@ recipe update-status screen:address:screen, msg:address:array:character, color:n
   local-scope
   load-ingredients
   screen <- move-cursor screen, 0, 2
-  screen <- print-string screen, msg, color, 238/grey/background
+  screen <- print screen, msg, color, 238/grey/background
 ]
 
 recipe save-sandboxes env:address:programming-environment-data [
@@ -192,12 +192,12 @@ recipe save-sandboxes env:address:programming-environment-data [
   {
     break-unless curr
     data:address:array:character <- get *curr, data:offset
-    filename:address:array:character <- integer-to-decimal-string idx
+    filename:address:array:character <- integer-to-decimal-text idx
     save filename, data
     {
       expected-response:address:array:character <- get *curr, expected-response:offset
       break-unless expected-response
-      filename <- string-append filename, suffix
+      filename <- append filename, suffix
       save filename, expected-response
     }
     idx <- add idx, 1
@@ -242,7 +242,7 @@ recipe render-sandboxes screen:address:screen, sandbox:address:sandbox-data, lef
   row <- add row, 1
   screen <- move-cursor screen, row, left
   sandbox-data:address:array:character <- get *sandbox, data:offset
-  row, screen <- render-code-string screen, sandbox-data, left, right, row
+  row, screen <- render-code screen, sandbox-data, left, right, row
   code-ending-row:address:number <- get-address *sandbox, code-ending-row-on-screen:offset
   *code-ending-row <- copy row
   # render sandbox warnings, screen or response, in that order
@@ -259,7 +259,7 @@ recipe render-sandboxes screen:address:screen, sandbox:address:sandbox-data, lef
     break-unless empty-screen?
     *response-starting-row <- copy row
     <render-sandbox-response>
-    row, screen <- render-string screen, sandbox-response, left, right, 245/grey, row
+    row, screen <- render screen, sandbox-response, left, right, 245/grey, row
   }
   +render-sandbox-end
   at-bottom?:boolean <- greater-or-equal row, screen-height
@@ -280,7 +280,7 @@ recipe restore-sandboxes env:address:programming-environment-data -> env:address
   idx:number <- copy 0
   curr:address:address:sandbox-data <- get-address *env, sandbox:offset
   {
-    filename:address:array:character <- integer-to-decimal-string idx
+    filename:address:array:character <- integer-to-decimal-text idx
     contents:address:array:character <- restore filename
     break-unless contents  # stop at first error; assuming file didn't exist
     # create new sandbox for file
@@ -289,7 +289,7 @@ recipe restore-sandboxes env:address:programming-environment-data -> env:address
     *data <- copy contents
     # restore expected output for sandbox if it exists
     {
-      filename <- string-append filename, suffix
+      filename <- append filename, suffix
       contents <- restore filename
       break-unless contents
       expected-response:address:address:array:character <- get-address **curr, expected-response:offset
@@ -310,7 +310,7 @@ recipe render-screen screen:address:screen, sandbox-screen:address:screen, left:
   reply-unless sandbox-screen
   # print 'screen:'
   header:address:array:character <- new [screen:]
-  row <- render-string screen, header, left, right, 245/grey, row
+  row <- render screen, header, left, right, 245/grey, row
   screen <- move-cursor screen, row, left
   # start printing sandbox-screen
   column:number <- copy left
diff --git a/sandbox/008-sandbox-test.mu b/sandbox/008-sandbox-test.mu
index a73064df..ce896017 100644
--- a/sandbox/008-sandbox-test.mu
+++ b/sandbox/008-sandbox-test.mu
@@ -78,14 +78,14 @@ after <render-sandbox-response> [
     break-unless sandbox-response
     expected-response:address:array:character <- get *sandbox, expected-response:offset
     break-unless expected-response  # fall-through to print in grey
-    response-is-expected?:boolean <- string-equal expected-response, sandbox-response
+    response-is-expected?:boolean <- text-equal expected-response, sandbox-response
     {
       break-if response-is-expected?:boolean
-      row, screen <- render-string screen, sandbox-response, left, right, 1/red, row
+      row, screen <- render screen, sandbox-response, left, right, 1/red, row
     }
     {
       break-unless response-is-expected?:boolean
-      row, screen <- render-string screen, sandbox-response, left, right, 2/green, row
+      row, screen <- render screen, sandbox-response, left, right, 2/green, row
     }
     jump +render-sandbox-end:label
   }
diff --git a/sandbox/009-sandbox-trace.mu b/sandbox/009-sandbox-trace.mu
index 1829e3a4..2a4cc55e 100644
--- a/sandbox/009-sandbox-trace.mu
+++ b/sandbox/009-sandbox-trace.mu
@@ -195,7 +195,7 @@ after <render-sandbox-results> [
     break-unless display-trace?
     sandbox-trace:address:array:character <- get *sandbox, trace:offset
     break-unless sandbox-trace  # nothing to print; move on
-    row, screen <- render-string, screen, sandbox-trace, left, right, 245/grey, row
+    row, screen <- render screen, sandbox-trace, left, right, 245/grey, row
   }
   <render-sandbox-trace-done>
 ]
diff --git a/sandbox/010-warnings.mu b/sandbox/010-warnings.mu
index c04e4690..5bfb9d7d 100644
--- a/sandbox/010-warnings.mu
+++ b/sandbox/010-warnings.mu
@@ -66,9 +66,9 @@ after <render-sandbox-trace-done> [
     {
       break-unless env
       recipe-warnings:address:array:character <- get *env, recipe-warnings:offset
-      row, screen <- render-string screen, recipe-warnings, left, right, 1/red, row
+      row, screen <- render screen, recipe-warnings, left, right, 1/red, row
     }
-    row, screen <- render-string screen, sandbox-warnings, left, right, 1/red, row
+    row, screen <- render screen, sandbox-warnings, left, right, 1/red, row
     # don't try to print anything more for this sandbox
     jump +render-sandbox-end:label
   }