Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > System

exist

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

Returns a number based on type of the string used in the command.

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

exist("x")

Returns

0 if there is no variable, operator, built-in function or script file (x.lsf) in the current script path

1 if x is a variable, example: x=5; ?exist(“x”);

2 if x is an operator or built in keyword, example: ?exist(“*”) or ?exist(“for”);

3 if x is a script file in the current script path, called “x.lsf”

 

Examples

The following simple examples show the usage of the exist command

a = 1:10;

?exist("a");

result: 

1  

 

?exist("farfield3d");

result: 

 

See Also

System level, newproject, fileexists

Copyright Lumerical Inc. | Privacy | Site Map