SourcePoint AMD Help

Table of Contents

isprogramsymbol

Determine if a string is a symbol within a currently loaded program.

Syntax

[result =] isprogramsymbol(symbol)

Where:

result

is a boolean variable to which the return value is assigned. It is TRUE if the symbol exists, or FALSE if it does not exist.

symbol

is a string constant or nstring variable specifying the symbol to look up.

Discussion

The isprogramsymbol function looks in each currently loaded program until it finds the specified symbol. When the first occurrence is found, it stops searching and returns TRUE. It returns FALSE if no instance of that symbol is found within any currently loaded program.

Examples

The following examples demonstrate the isprogramsymbol function. Here it is assumed that a program is loaded which contains the symbols foo and fun.

Example 1

Command input:

isprogramsymbol("foo")

Result:

TRUE

Example 2

Command input:

define nstring s = "fun"
isprogramsymbol(s)

Result:

TRUE

Example 3

Command input:

isprogramsymbol("test")

Result:

FALSE

Related Topics: