jump to navigation

WinTask – AbsInt November 21, 2007

Posted by Pat's Fan in WinTask.
comments closed
'
' AbsInt – return the absolute value of a number
'
' note: ABS is a WinTask keyword
'
Function AbsInt(int)
  If int < 0 Then
    AbsInt = -1 * int
  Else
    AbsInt= int
  EndIf
EndFunction
msgbox("The absolute value of "+Str$(-123)+" is "+Str$(AbsInt(-123)),0,"AbsInt")