Question
· Sep 9, 2021

$ZNAME(variable,0)

This function is supposed to tell me that argument 1 is a valid variable name or not.

Doesn't work with an array variable, eg W $ZNAME("WLCOM(I)",0).

Not a question, just a whinge really.....

Product version: Caché 2017.1
$ZV: Cache for Windows 2017.2.2
Discussion (3)3
Log in or sign up to continue

Instead of using the first piece with $PIECE(variable,"("), I recommend using $NAME(@variable,0). $NAME has the advantage that it will likely be updated in the event of any changes to introduce new variable syntax, while $PIECE(variable,"(") will remain stuck with the simple syntax. One advantage of $NAME(@varaible,0) is that $NAME will also check the syntax of all the subscripts. One disadvantage is that all subscripts must be defined.