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.




l$ = "1,1234,62,234,12,34,6"
 
dim n$(1)
 
n = token(l$, n$(), ", ")
 
for i = 1 to n
	t$ = n$(i)
	if t$ > m$ then m$ = t$ end if            // or: if t$ > m$ m$ = t$
	if val(t$) > m then m = val(t$) end if	  // or: if val(t$) > m m = val(t$)
next
 
print "Alphabetic order: ", m$, ", numeric order: ", m