|
|
Since the groupsize actually varies (i.e. for any given result there may be
groups of different sizes), it's probably better to specify the number of
groups instead, so maybe something like:
TempString:="15"
numgroups:=5
t:=Number(TempString)
randomlist:=[]
repeat with j:=1 to t
AddLinear(randomlist,j,Random(1,j,1))
end repeat
ResponseString:=""
a:=0
b:=t
repeat with j:=1 to t
ResponseString:=ResponseString^randomlist[j]
a:=a+numgroups
if a>=b then
ResponseString:=ResponseString^Return
b:=b+t
else
ResponseString:=ResponseString^" "
end if
end repeat
Chris Forecast
|
|