Start Back Next End
  
ZBasic System Library
291
ZBasic Microcontrollers
Signum
Type
Function returning the same type as the first parameter.
Invocation
Signum(val)
Parameter
Method
Type
Description
val
ByVal
signed
The value to be tested for positive, zero, negative.
Discussion
This function returns +1, 0 or –1 depending on whether the value provided is positive, zero or negative.
The type of the return value will be the same as the type of the parameter value.
Example
Dim i as Integer, j as Integer
i = -23
j = Signum(i)
' result will be -1
Compatibility
This function is not available in BasicX compatibility mode.
Previous page Top Next page