fn: !
[contents]

Contents

Syntax

The syntax for ! calls is:

f++:  
!(number param)

n++:  
@!(number param)

Description

! is the logical not operator, it takes a single number as an input parameter, if the value of the input parameter is 0 then it returns 1, otherwise it returns 0.

Note: It is typically faster to use exprtk for logical operators, plus the syntax is nicer.

f++ example

Example of ! being used with f++:

int a=0

console("not a: ", !(a))

=(a, 1)

console("not a: ", !(a))

n++ example

Examples of ! being used with n++:

@int a=0

@console("not a: ", @!(a))

@=(a, 1)

@console("not a: ", @!(a))

@int a=0

@if(!(a))
	@console("condition evaluated to true")
else
	@console("condition evaluated to false")

Sponsors