[Gmsh] How to find if a variable exists
jim.gmsh at gmail.com
Wed Sep 7 22:30:27 CEST 2016
I have written macros returning arrays of various items, such as point IDs.
Depending on the arguments to the function, some arrays can be of different
sizes. To ensure that there is no "junk" at the end of the arrays left from
a previous call, I would like to Delete the arrays before building them.
However, the first time the macro is called, the array does not exist, and
that causes an error. One workaround is to force the array to exist by
adding something like x = 0; before the Delete command, but I was
wondering if there is a more direct way to query if a specific variable
exists. Thanks for any information.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gmsh