24 lines
500 B
Plaintext
24 lines
500 B
Plaintext
# 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 |