Task

Show how to return more than one value from a function.




def getstrs (int n)
        decl string<> input
 
        while (> n 0)
                out ": " console
                append (in string console) input
                dec n
        end while
 
        return input
end getstrs
 
decl int amount
out "how many strings do you want to enter? " console
set amount (in int console)
 
decl string<> ret
set ret (getstrs amount)
 
out endl ret endl console