nikitaeverywhere
nikitaeverywhere

Reputation: 1343

How to check that variable exists in Caché Object Script?

Is there a more elegant way in COS just to check that variable is set?

The tricky one I can guess is the next one:

set test = ""
write $get(test, "NO") '= "NO"

But the test variable can also be equal to "NO"...

Upvotes: 1

Views: 1044

Answers (1)

rfg
rfg

Reputation: 1636

You can use $Data(var) for that. Documentation.

Upvotes: 2

Related Questions