On 23 January 2013 12:23, Göran Krampe <goran@krampe.se> wrote:
Hey!
I have a struct something like this:
struct { const char * attribute; int size; int datatype; }
...and I am trying something like this to match an NBExternalStructure:
fieldsDesc ^#( String attribute; int size; int datatype; )
...or even this:
^#( NBExternalString attribute; int size; int datatype; )
All these give me some DNU (nil) for #asAJOperand when emitting code.
The only one that works is when I use NBExternalAddress as can be seen in action in NBTestStructure2. Is this by design or am I simply an early adopter and support for String etc isn't there yet?
I think it is not working because NBExternalString is quite special when it about handling the values. For structure, i think, you'd better use 'char *' , or 'void*'.. and then to read string you can do: struct attribute readString
regards, Göran
-- Best regards, Igor Stasenko.