IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Zen on January 11, 2006, 09:23:56 AM

Title: Imports & Aurora Function Names
Post by: Zen on January 11, 2006, 09:23:56 AM
Hello.

I am trying to create an import called select and i cannot compile as it is giving me a syntax error because the compiler thinks im trying to use Aurora's Select command. If i made the dll i would change it, but as it is part of the windows API i cannot. Is there an easy way around it?

Lewis
Title: Re: Imports & Aurora Function Names
Post by: Ionic Wind Support Team on January 11, 2006, 11:56:40 AM
Use the ALIAS keyword.

declare import, SelectX ALIAS select(...);

Which will resolve the conflict.  You'll call the function using the SelectX name
Title: Re: Imports & Aurora Function Names
Post by: Zen on January 11, 2006, 12:45:15 PM
Nope. trued using alias and it still didnt work.

Lewis
Title: Re: Imports & Aurora Function Names
Post by: Ionic Wind Support Team on January 11, 2006, 01:20:49 PM
I use it myself all the time.  How about posting the funciton in question
Title: Re: Imports & Aurora Function Names
Post by: sapero on January 11, 2006, 01:29:25 PM
winsock? try with quotes:
declare import, SelectX ALIAS "select"(
int nfds,
fd_set *readfds,
fd_set *writefds,
fd_set *exceptfds,
timeval *timeout
),int;
Title: Re: Imports & Aurora Function Names
Post by: Parker on January 11, 2006, 02:55:46 PM
In IBPro we had to have the quoted syntax so the compiler didn't think we were doing a select command. Sapero's way will work.

Edit: Apparently SELECT is its own token and doesn't qualify as a literal, just if you're wondering why it won't work the other way.