Native types can't be used with pointers

Just starting out? Need help? Post your questions and find answers here.
PhilR1
New User
New User
Posts: 4
Joined: Mon Apr 15, 2013 4:31 pm

Native types can't be used with pointers

Post 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
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Native types can't be used with pointers

Post by skywalk »

Change to *name_s and try the code again.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Native types can't be used with pointers

Post by ts-soft »

Better change to: *name and the code should compile without other changes :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Native types can't be used with pointers

Post 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.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Native types can't be used with pointers

Post 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: )
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
PhilR1
New User
New User
Posts: 4
Joined: Mon Apr 15, 2013 4:31 pm

Re: Native types can't be used with pointers

Post 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
Post Reply