Code: Select all
Procedure.d MinArray(*Array)
!return Math.min.apply(null, p_array.array);
EndProcedure
Procedure.d MaxArray(*Array)
!return Math.max.apply(null, p_array.array);
EndProcedure
; ***************
; EXAMPLE
; ***************
Dim Arr.d(5)
Arr(0)=1.1
Arr(1)=11000.5
Arr(2)=10.11
Arr(3)=777.5
Arr(4)=3.5
Arr(5)=12
va=MinArray(Arr())
vb=MaxArray(Arr())
vc.f=MinArray(Arr())
vd.f=MaxArray(Arr())
ve.d=MinArray(Arr())
vf.d=MaxArray(Arr())
vg.q=MinArray(Arr())
vh.q=MaxArray(Arr())
Debug va
Debug vb
Debug vc
Debug vd
Debug ve
Debug vf
Debug vg
Debug vh