[Number] neg | Manual

[Number] neg

Returns a boolean indicating wether the number is negative. This message will return a boolean object 'True' if the recipient is negative and 'False' otherwise. It's the eaxct opposite of the 'positive' message.

 hope := -1.
 (hope neg) ifTrue: { Pen write: 'No hope left'. }.

 The example above will print the message because the value of the variable
 hope is less than 0.

back to homepage
back to manual menu

This API reference guide has been generated automatically from source code comments using the shtml.ctr script.