<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Shamika,<div><br></div><div>There is currently no API to access struct (nor cells); it *is* possible, but not easy; and it would require a little bit of code. Here are the possibilities to access structs/cells:</div><div><div>- either use the fact that structs are overloaded mlists: thus you can access them as mlist, and extract/create your data by hand in C++ (that's where some code is needed... we could show you that if needed)</div><div>- or, easier, do the struct <-> mlist conversion on the Scilab side, not on C++ side. That way you only manipulate mlists on the C++ side. Or, for that matter, convert them, on the Scilab side, in/from another format easily managed on the C++ side.</div><div>- now, maybe it's worth looking at Scilab 6, where there are native types "types::struct" and "types::cell" directly in the api_scilab API... which makes things much easier. But the API is not documented (yet).</div><div><br></div><div>We can talk more about it if you need; the right solution may depend of your the exact use case (in terms of performance in particular). Also we strongly suggest that you start looking at Scilab 6 for that; if we have done things right, everything should be easier there :). We can help you on that too...</div><div><br></div><div>Regards,</div><div><br></div><div>François</div><div><br></div><div><br></div><div><br></div><div><div>On Oct 26, 2015, at 2:39 PM, Shamika Mohanan <<a href="mailto:shamika.i.nair@gmail.com">shamika.i.nair@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>Hi,<br><br></div>I posted this query on Scilab developer's mailing list but I got no reply. I'm trying my luck here. <br><br>I'm using <span class="">Scilab</span> API in C++ code. I have to return struct and cell array values to <span class="">Scilab</span> environment. As there are no <span class="">Scilab</span>
 API functions for struct and cell array data types, is there any 
way to do it? If I do have to write API functions, would list/mlist be 
the best way to deal with structs and cell arrays?<div id=":1s6" class="" tabindex="0"><img class="" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"><br></div>Shamika<br></div>
_______________________________________________<br>users mailing list<br><a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>http://lists.scilab.org/mailman/listinfo/users<br></blockquote></div><br></div></body></html>