kurz/tests/test.qbl

43 lines
432 B
Plaintext
Raw Normal View History

2022-12-14 09:34:49 +01:00
//valid
2022-12-14 20:39:51 +01:00
//output: Hello, World!
//4242test2Falsetesttesttest
2022-12-14 09:34:49 +01:00
"Hello, World!\n" print 43 foo foo deq
// Dequeues, enqueues 42 and 17, prints the head
function any => int foo
{
deq 42 17 print
}
2022-12-14 20:39:51 +01:00
"test2" print false
2022-12-14 04:12:03 +01:00
check
print
2022-12-14 20:39:51 +01:00
function bool => str check
2022-12-14 04:12:03 +01:00
{
if
{
"True"
}
else
{
"False"
}
}
function int => whileFunction
{
2022-12-14 11:46:47 +01:00
dup
2022-12-14 20:39:51 +01:00
0 req >
req while
{
2022-12-14 20:39:51 +01:00
1 - 0 dup >
"test" req req print req
}
deq
}
2022-12-14 09:34:49 +01:00
3 whileFunction