Jump to content

Enumeration


MattHiggs
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Wikitionary

Edited by TheDcoder

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
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?

Link to comment
Share on other sites

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
Link to comment
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 (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
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.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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.

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

Link to comment
Share on other sites

  • Moderators

@iamtheky you deserve remuneration for that enumeration elucidation :)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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

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)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...