Hi there,

is there a way to use a string variable during a children-call in a scilab
Here is an example for what i want to do:

function myvalue = getchild(myparent,mychild)
    //this function doesn't work and is just meant to show the idea of what
I want to do:
   //"mychild" is a string to call for a childname of "myparent", which is a
struct. Is this at all possible?
    myvalue = myparent.mychild;    

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: 
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
users mailing list

Reply via email to