[Scilab-Dev] How to use a string as a childname in structure?
christophk
christoph.knappe at gmail.com
Thu Dec 1 11:16:25 CET 2016
Hi there,
is there a way to use a string variable during a children-call in a scilab
structure?
Here is an example for what i want to do:
function myvalue = getchild(myparent,mychild)
//how do i put a "string" as a childname to a struct?
myvalue = myparent.mychild;
endfunction
s = struct('a',[1 2 3],'b', [4 5 6]);
//how do I change my getchlidren function for this to work
x = getchild(s,'a'); // equivalent for x = s.a;
y = getchild(s,'b'); // equivalent for y = s.b;
Thanks all!
--
View this message in context: http://mailinglists.scilab.org/How-to-use-a-string-as-a-childname-in-structure-tp4035160.html
Sent from the Scilab developers - Mailing Lists Archives mailing list archive at Nabble.com.
More information about the dev
mailing list