Task

Create a function that returns the maximum value in a provided set of values,

where the number of values may not be known until run-time.




 100 REMMAX
 110 R$ = "":E$ = ""
 120 L =  LEN (L$)
 130 IF L = 0 THEN  RETURN
 140 FOR I = 1 TO L
 150     C$ =  MID$ (L$,I,1)
 160     SP = C$ = " "
 170     IF SP THEN  GOSUB 200
 180     E$ = E$ + C$
 190 NEXT I
 200 C$ = ""
 210 IF E$ = "" THEN  RETURN
 220 V =  VAL (E$):V$ = R$
 230 E$ = "":E = V$ = ""
 240 IF E AND V = 0 THEN  RETURN
 250 R$ =  STR$ (V)
 260 IF E THEN  RETURN
 270 R =  VAL (V$)
 280 IF R < V THEN  RETURN
 290 R$ = V$: RETURN