[Tutor] [newbie alert] why can't I find a function that givesme the sign of an integer?

Alan Gauld alan.gauld at freenet.co.uk
Thu Jan 26 22:53:56 CET 2006

>> In basic I can use SGN to get back -1, 0,  +1 if a number is <0, 0, >0.
> Well, the cmp() function does this if you compare the number to 0:

Neat trick Orri, I'd never have thought of that one :-)

Alan G.

More information about the Tutor mailing list