Add two more code examples
This commit is contained in:
parent
08f9cc4a11
commit
f9f2694b96
2 changed files with 18 additions and 0 deletions
4
wip-duuqnd/user-side-compiler/example-1.c6l
Normal file
4
wip-duuqnd/user-side-compiler/example-1.c6l
Normal file
|
@ -0,0 +1,4 @@
|
|||
if x - 1 == 10 then
|
||||
x = 0
|
||||
y = 1
|
||||
end
|
14
wip-duuqnd/user-side-compiler/example-2.c6l
Normal file
14
wip-duuqnd/user-side-compiler/example-2.c6l
Normal file
|
@ -0,0 +1,14 @@
|
|||
char_to_print = 48 #value for 0 caracter
|
||||
char_pos =0
|
||||
for x do 255 times
|
||||
x_is_prime = 1
|
||||
for y do x times
|
||||
if (x / y) * y == x then # true if x is divicible by y
|
||||
x_is_prime =0
|
||||
end
|
||||
end
|
||||
if x_is_prime == 1 then
|
||||
char_pos = char_pos + 1
|
||||
char_draw(0, char_pos, char_to_print)
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue