[Gmsh] How to find if a variable exists
Jim Monte
jim.gmsh at gmail.com
Wed Sep 7 22:30:27 CEST 2016
Hi All,
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] = 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.
Jim Monte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20160907/53b090dc/attachment.html>
More information about the gmsh
mailing list