Help with a code
Monkey Forums/Monkey Beginners/Help with a code
| ||
Hi, in this code what is the function of the ">" operator? Method AddHL(inValue:Short) Local value:Int = HL + inValue; SetHL(value) CARRY = (value > 65535) End Method |
| ||
'>' is a comparison operator and means 'greater than'. It's a boolean operator and the result of the expression is True or False (0 or non-null). CARRY = (value > 65535) means: If value > 65535 Then CARRY = True Else CARRY = False It is used to check overflow of an unsigned Short (16-bit) data type. |
| ||
Thanks Danilo |