kurz/tests/test.qbl

48 lines
453 B
Plaintext
Raw Normal View History

2022-12-14 09:34:49 +01:00
//valid
//output: Hello, World!\n4242test2Falsetesttesttest
"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 04:12:03 +01:00
"test2" print 1
check
print
function int => str check
{
if
{
"True"
}
else
{
"False"
}
}
2022-12-14 11:46:47 +01:00
// 3
// 3 3
// 3
// 3 1
// 2
// 2 "test"
// "test" 2
function int => whileFunction
{
2022-12-14 11:46:47 +01:00
dup
while
{
2022-12-14 11:46:47 +01:00
1 - "test" req print dup
}
deq
}
2022-12-14 09:34:49 +01:00
3 whileFunction