how does the "as" operator work?

Just starting out? Need help? Post your questions and find answers here.
jorgejones
User
User
Posts: 32
Joined: Tue Mar 21, 2006 8:27 am

how does the "as" operator work?

Post by jorgejones »

when i try to use the AS operator it raises an error, how can i use it?

i tried

foreach temp() as var
....

yet it doesnt let me whats the point of it being highlighted if its not supported?
freak
PureBasic Team
PureBasic Team
Posts: 5944
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

The As keyword is only for use together with Import:

Code: Select all

Import "xyz.lib"
  myFunction() As "some_weird_name"
EndImport
quidquid Latine dictum sit altum videtur
User avatar
Demivec
Addict
Addict
Posts: 4270
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Post by Demivec »

jorgejones wrote:when i try to use the AS operator it raises an error, how can i use it?

i tried

foreach temp() as var
....

yet it doesnt let me whats the point of it being highlighted if its not supported?
The "AS" operator is used between Import and EndImport.
Look to the user manual for specifics on those commands.
jorgejones
User
User
Posts: 32
Joined: Tue Mar 21, 2006 8:27 am

Post by jorgejones »

oh i thought it could be used for assigning a variable in a loop :(
sorry
Post Reply