Page 1 of 1

Native types can't be used with pointers

Posted: Tue Apr 23, 2013 6:18 pm
by PhilR1
I'm trying to compile an example program to run eSpeak and the above message is generated from the following code:
Is this a genuine syntax error or am I missing some option that needs to be set in the complier?

StructureUnion
number.l; ; used for WORD and SENTENCE events. For PHONEME events this is the phoneme mnemonic.
*name.s; ; used for MARK and PLAY events. UTF8 string
EndStructureUnion
EndStructure

Re: Native types can't be used with pointers

Posted: Tue Apr 23, 2013 6:29 pm
by skywalk
Change to *name_s and try the code again.

Re: Native types can't be used with pointers

Posted: Tue Apr 23, 2013 7:05 pm
by ts-soft
Better change to: *name and the code should compile without other changes :wink:

Re: Native types can't be used with pointers

Posted: Tue Apr 23, 2013 8:02 pm
by skywalk
Haha, yes, you will have to change *name.s everywhere in code.
I only suggest *name_s so you know the pointer's intended data.
Like, *somepointer_i or *somepointer_d.

Re: Native types can't be used with pointers

Posted: Tue Apr 23, 2013 8:45 pm
by ts-soft
I think a pointer with name *name is always a string. I have never seen a name like 0815 :wink:
(okay, i have seen, 007 :mrgreen: )

Re: Native types can't be used with pointers

Posted: Tue Apr 23, 2013 8:54 pm
by PhilR1
The author fixed it.

Just fyi this is what he said:

The problem was that some pointer had native PureBasic Types, like this:
global *pointer.s
The latest PB is really strict about this, so you have to change it to the recommended: global *pointer, instead.

Thanks for your responses