Modest

Unary Value Expressions

Common form

<#operator#> <#argument_value_expression#>

Brief

Operation Code Example Valid types Result type Comment
Not not arg Bool, Word8, Integer type(arg)  
Neg -arg Integer, Float type(arg)  
Ref &arg Any Pointer to type(arg)  
Deref *arg Pointer type(arg)#to  

Not

Logical form (Requires Bool argument) Returns true when argument is false, otherwise returns false.

Bitwise form (Requires Integer or Bool argument)

Valid argument type: Bool, Word8, Integer

	not x

Neg

Returns true when left is not equal to the right, otherwise returns false.

Valid argument type: Integer, Float

	-x

Ref

Returns pointer to type(argument)

	&x

Deref

Returns the value pointed to by the argument

Valid argument type: Pointer

	*x