example of a simple function to find the average of all its paramters
proc averagelocal j accendprocif argcnt() != 0 then
endifacc = 0
for j=0 while j<argcnt() step j+=1 do
// get parameter j via the arg operator @done
acc += @jreturn float(acc) / argcnt()
// return invalid value
returnusing the average function
a = average(x, y)a = average()
a = average("25", 17, 1, -27, x, 2.5)