[Scilab-users] check if variable within structure is available

Philipp Mühlmann p.muehlmann at gmail.com
Tue Apr 5 15:26:47 CEST 2016


Is there a way to check if a variable within a structure is available?


Example:

There is a structure   handle  containing different variables.


e.g:

handles.status     // contain Status info of different pushbuttons --> in
fact status is a structure itself:  handles.Status.pb1; handles.Status.pb2;
handles.I_ORG   // contains original Image --> array
handles.I_RES    // contains resulting Image  --> array


Now I want to check if  handles.I_RES existst



exists('handles.I_RES' , 'a')    will return "0" even if handles.I_RES does
exist
isdef  ('handles.I_RES' , 'a')    will return "F" even if handles.I_RES
does exist


Thank you,
Philipp

-- 
In Kanada is' ka' na' da. Sonst wär' Kanada Jemanda.

There we have the salad.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160405/0d80423d/attachment.htm>


More information about the users mailing list