Mintoris Forum

Author Topic: Variable number of subroutine parameters  (Read 1855 times)

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Variable number of subroutine parameters
« on: Jul 11, 2014, 06:07 PM »
The new array constants featured in Basic 6.3 now allow variable number of parameters by encoding them into an array.

maxx = MaxVal([a,b,c,d])

Sub MaxVal(a())
  d() = getdim(a())
  maxx = a(0)
  for i = 1 to d(1)
    if a(i) > maxx then maxx = a(i)
  endif
  return maxx
End Sub