Added programs/bf.grnd

This commit is contained in:
2025-09-13 10:10:21 +10:00
parent aa882c10fb
commit b92f99cc70
4 changed files with 251 additions and 0 deletions

24
packages/lists/lists.grnd Normal file
View File

@@ -0,0 +1,24 @@
# Converts list to string
fun -string !ltos -list &inlist
getlistsize *inlist &listlen
set &idx 0
set &ans ""
add $ans '[' &ans
@stdoutloop
getlistat *inlist $idx &store
add $ans $store &ans
add $idx 1 &idx
equal $idx $listlen &store
if $store %trueend
add $ans ", " &ans
jump %stdoutloop
@trueend
add $ans "]" &ans
return $ans
endfun
setlist *store 4 2 "Hello"
pusharg *store
call !ltos &store
stdlnout $store