Memory layout of a data structure: Difference between revisions

→‎{{header|MATLAB}}: works fine with Octave, too. Verified with Octave 3.4.3
(Remove omit from Go, now that there's a solution posted)
(→‎{{header|MATLAB}}: works fine with Octave, too. Verified with Octave 3.4.3)
Line 301:
)</lang>
 
=={{header|MATLAB}} / {{header|Octave}}==
Defining structs in MATLAB is kind of bulky, making a class definition might be cleaner for this purpose. If you need to enumerate each pin rather than set the state of the pin using the name of the pin, you can use struct2cell() on the rs232 struct, which will return a cell array whose entries are the value of each of the structs fields in the order in which they were defined.
 
Anonymous user