Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Operators

!

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

Is the logical NOT operator. If a value is 0, then NOT returns 1. For all other values, NOT returns 0. NOT(A) is equivalent to A==0, where == is the comparison operator.

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

out = !a;

applies logical NOT operator to a

out = ~a;

applies logical NOT operator to a

 

Examples

This example shows the usage of the "!" and "~" operator.

a=1;

?!a; #output of not operator

result: 

a=0;

?~a; #output of not operator

result: 

a=3;

?~a; #output of not operator

result: 

if (!fileexists("filename.fsp")) { 

 save("filename.fsp");

 

See Also

Operators, ==, !=, <=, >=, <, >, &, and, |, or, !, ~

Copyright Lumerical Inc. | Privacy | Site Map