Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

exist (MathScript RT Module Function)

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

Owning Class: membership

Requires: MathScript RT Module

Syntax

c = exist(a)

c = exist(a, option)

Description

Determines whether a variable, file, LabVIEW MathScript function, or directory exists.

Details

Examples

Inputs

Name Description
a Specifies the name of the variable, file, function, or directory that you want to determine exists. a is a string.
option Specifies the type of item for which you want to search. option is a string that accepts the following values.

'dir' Checks for directories.
'file' Checks for files or directories.
'function' Checks for MathScript functions. LabVIEW does not search for MathScript functions that you define.
'var' Checks for variables.

Outputs

Name Description
c Determines whether a exists. c is an integer that can return the following values.

0 a does not exist.
1 a is a variable in use.
2 a is an existing file.
5 a is a MathScript function.
7 a is an existing directory.

Details

If you call this function from a MathScript Node, LabVIEW operates with slower run-time performance for the MathScript Node. To optimize the performance of the MathScript Node, remove this function from scripts.

This function is not supported in the LabVIEW Run-Time Engine. Do not use this function in a stand-alone application or shared library.

Examples

A = 'I do exist'
C = exist('A')

Related Topics

dir
is_empty


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit