parent
51b3503143
commit
e5e3640cfb
|
@ -116,7 +116,7 @@ case PRINT_CHARACTER_TO_DISPLAY: {
|
|||
int height = (h >= 0) ? h : 0;
|
||||
int width = (w >= 0) ? w : 0;
|
||||
int c = ingredients.at(0).at(0);
|
||||
int color = TB_BLACK;
|
||||
int color = TB_WHITE;
|
||||
if (SIZE(ingredients) > 1) {
|
||||
color = ingredients.at(1).at(0);
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@ def increment-counter outer:space/names:new-counter, x:num -> n:num/space:1 [
|
|||
def main [
|
||||
local-scope
|
||||
# counter A
|
||||
a:space <- new-counter 34
|
||||
a:space/names:new-counter <- new-counter 34
|
||||
# counter B
|
||||
b:space <- new-counter 23
|
||||
b:space/names:new-counter <- new-counter 23
|
||||
# increment both by 2 but in different ways
|
||||
increment-counter a, 1
|
||||
b-value:num <- increment-counter b, 2
|
||||
|
|
|
@ -6,7 +6,7 @@ def main [
|
|||
print-character-to-display 97, 1/red, 2/green
|
||||
1:num/raw, 2:num/raw <- cursor-position-on-display
|
||||
wait-for-some-interaction
|
||||
clear-line
|
||||
clear-line-on-display
|
||||
move-cursor-on-display 0, 4
|
||||
print-character-to-display 98
|
||||
wait-for-some-interaction
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Example program showing how multiple functions with the same name can
|
||||
# coexist, and how we select between them.
|
||||
#
|
||||
# Expected output:
|
||||
# 4
|
||||
# 7
|
||||
# 7
|
||||
|
||||
def test a:num -> b:num [
|
||||
local-scope
|
||||
load-ingredients
|
||||
|
|
Loading…
Reference in New Issue