L3DT users' wiki
Large 3D terrain generator

xor

Description

The boolean 'xor' function returns true if one, and only one, of its two boolean arguments are true.

Function prototype

bool xor <bool:arg1> <bool:arg2>

Arguments

Name Type Comment
arg1 bool The first boolean value.
arg2 bool The second boolean value.

Return value

True if:

  • arg1 is true and arg2 is false, or;
  • arg2 is true and arg1 is false.

False otherwise.

Example

echo <zs:xor false false> // should be false
echo <zs:xor false true> // should be true
echo <zs:xor true false> // should be true
echo <zs:xor true true> // should be false

… the output of which is written to the event log by echo as:

false
true
true
false

Comments

None.

See also

 
plugins/general/zeoscript/reference/functions/xor.txt · Last modified: 2017/08/31 05:23 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki