25 of 307
ZBasic System Library 15 ZX Microcontroller Family Abs Type Function returning the same type as the parameter Invocation Abs(arg) Parameter Method Type Description arg ByVal numeric The value from which the absolute value will be computed. Discussion The absolute value function returns the magnitude of the passed value. It is primarily useful for signed numeric types such as Single, Integer and Long. Unsigned parameter values will be returned unchanged. The type of the return value will be the same as the type of the parameter provided. Example Dim i as Integer, j as Integer i = -45 j = Abs(i) ' result is 45