Can a function return a 1D Array?
I would like to have a function who receive a Int and, depending on the length of the input number, return a list (1D array) of int.
There en example of what I mean:
input = 1234
output[0] -> 34
output[1] -> 12
DEF SPLIT V ' Convert the int into a str for length. V$=STR$(V) ' Create the empty array for the return value. DIM SPLIT_ARR[0] FOR I=LEN(v$) TO 1 STEP -2 I_STEP = I-2 'I_STEP won't go below 0. IF I_STEP < 0 THEN I_STEP=0 'Extract the number from the str. SPLITED = VAL(MID$(V$,I_STEP,I)) 'Add that value to the array. PUSH SPLIT_ARR, SPLITED NEXT 'Return the array. RETURN SPLIT_ARR END