MattHiggs

Enumeration

15 posts in this topic

Hey all.  So I am embarrassed to admit this, but the desire to understand is suppressing that, but, in the years that I have been teaching myself other languages and other IT-related principles, the word "enumeration" comes up quite a lot.  Now I understand what that means when used in a mathematical context, but in scripting/IT context, seems to have different meanings depending on where it is applied, whether it is an adjective or a verb, etc.  Does someone want to take a shot at explaining the concept of enumeration as it relates to IT/scripting, or just link me to a resource that does so?  At this point, when I see the phrase "enumerate a registry key" or "returns an enumerated object", I have no freaking clue what any of that means

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

It means to "list" things... For example: "Enumerate a registry" means to list that registry ;)

Wikitionary

Edited by TheDcoder

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites
1 minute ago, TheDcoder said:

It means to "list" things... For example: "Enumerate a registry" means to list that registery ;)

Ok, so lets take the registry key example then.  I am guessing that if there were a function which enumerated a registry key, that would return, in some kind of format, a list of the indicated key's sub-keys, the values present in each, and their values, or something similar?

Share this post


Link to post
Share on other sites

Yup, that would be it... You can say that: Registry Editor enumerates the values of a registry key:

FzqmcsC.png


Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I use Enums to create meaningful variable names for array indexes.

; Binding GUI Control names, the deletes are buttons
Enum    $eCC_GUI_binding_control_index_label, _
        $eCC_GUI_binding_control_action_delete, _
        $eCC_GUI_binding_control_action_edit_button, _
        $eCC_GUI_binding_control_action_combo, _
        $eCC_GUI_binding_control_action_internal_input, _
        $eCC_GUI_binding_control_event_icon_pic, _
        $eCC_GUI_binding_control_event_input, _
        $eCC_GUI_binding_control_event_released_combo, _
        $eCC_GUI_binding_control_event_delete, _
        $eCC_GUI_binding_control_event_keyboard_pic, _
        $eCC_GUI_binding_control_cooldown_input, _
        $eCC_GUI_binding_control_data_max
        
$aCC_GUI_binding_control[$i][$eCC_GUI_binding_control_action_delete] = GUICtrlCreateButton("x", $action_delete_button_pos_x, $i * $gCC_row_h, $action_delete_button_pos_w, 20)

A more simple version would be:

Enum $eCoord_x, $eCoord_y, $eCoord_z, $eCoord_max

Local $aCoord[9001][$eCoord_max]

$aCoord[$i][$eCoord_x] = 10

 

Edited by Xandy

Spoiler

I have no complaints.  I mean there are lots of things wrong with the world but I am not unhappy.
How could we ever fix it all, but to hope that one day we might?

 

Share this post


Link to post
Share on other sites

@Xandy I do not think that he is talking about "Enum" but about Enumeration in general :).


Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

Do you think the AutoIt keyword would be named Enum if it was something completely different?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2016-08-18 - Version 1.4.6.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2016-12-04 - Version 1.2.2.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

@water Huh? I did not say that it is different... I just pointed out that the OP is not asking about the Enum keyword.


Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

Enum is AutoIt's keyword for an Enumeration. According to the help file: "Enum - Enumerates constants."
When the OP asks about Enumeration in an AutoIt forum then Enum is a valid answer.

2 people like this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2016-08-18 - Version 1.4.6.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2016-12-04 - Version 1.2.2.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#10 ·  Posted

and in the IT/scripting sense, the literal is the most apt.  It is a list of things, one by one.  And enum is even more literal in that it assigns numbers to those items, putting some numeration on your numeration.

1 person likes this

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

#12 ·  Posted

Yes, that's worth some money. Count with me: $1 or 2 or 3 or 4 or ...

1 person likes this

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

#13 ·  Posted

22 hours ago, jchd said:

$1 or 2 or 3 or 4 or ...

$1000 :D


Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

#14 ·  Posted

I only doggy paddle.


Spoiler

I have no complaints.  I mean there are lots of things wrong with the world but I am not unhappy.
How could we ever fix it all, but to hope that one day we might?

 

Share this post


Link to post
Share on other sites

#15 ·  Posted

On 11/6/2016 at 8:46 PM, JLogan3o13 said:

you deserve remuneration for that enumeration elucidation

I have no idea what it means, but it's the best bit of English I've read in a while: very poetic! :tv_happy:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now