PenUltima Online

It is currently Sun Sep 07, 2008 8:50 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: "enum"
PostPosted: Sat Feb 04, 2006 10:19 am 
Offline

Joined: Sat Feb 04, 2006 10:13 am
Posts: 12
Location: Livorno Italy
I script from 3 years but I have never used "enum".
Someone can explain me how to use it?

_________________
-----------------------------------------
Zandor
Scripter ZHI Shard


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 04, 2006 11:02 am 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 139
Location: Illinois, USA
I am not sure what you are talking about here.

Can you explain a little better what you mean by enum?

Is it EnumerateOnlineCharacters?
Is it EnumerateItemsInContainer?

Those are the only things I can think of that have that in it.

_________________
2nd place is the 1st loser.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 04, 2006 5:53 pm 
Offline

Joined: Sat Jan 28, 2006 12:39 pm
Posts: 38
Location: Greece
enumerator is a language feature used to define a set of constants. It is usually used when you have to declare more than 4 constants, instead of typing const a hundred times, you define an enumerator in the form:
Code:
enum <enum_name>
   CONST_NAME1 := <value>,
   CONST_NAME2 := <value>,
   CONST_NAME3 := <value>,
   CONST_NAME4 := <value>
endenum


<enum_name> any string value name such as MY_ENUMARATION, and <value>, whatever can be defined as a constant.

edit: you can check the distro SVN repository for more examples.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl