How to find the sign of a value?

Blitz3D Forums/Blitz3D Programming/How to find the sign of a value?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

My brain isn't working at the moment. What's a very simple way to determine the sign of a variable?
I'm thinkinf of somehow using the ABS() function but


Ironically, it came to me as I typed this question!
If ABS(variable) = variable
  ;variable is positive (or zero?)
Else
  ;variable is negative
EndIf