fn: &&
[contents]

Contents

Syntax

The syntax for && calls is:

f++:  
&&(params)

n++:  
@&&(params)

Description

&& is the logical and operator, it takes a non-zero number of parameters, if any of the parameters evaluate to false then it returns 0, otherwise it returns 1.

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 x=3, y=7
if(&&(<(1, y), <(x, y))
	console("y is greater than both 1 and x")

n++ example

Examples of && being used with n++:

@int x=3, y=7
@if(&&(<(1, y), <(x, y))
	@console("y is greater than both 1 and x")

@int x=3, y=7
@console(@&&(<(1, y), <(x, y)))

@int a=3, b=-2

@console("@&&(@>(a, 0), @>(b, 0))")
@# expected output: 0