472,779 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

Enumeration vs making a list

To me, when you enumerate, you make a list of specific items, like
enumerating controls in a form. Am I missing something? I mean is there
something more to the meaning of the term "enumeration" or "enumerate" (in
programming context) other than just sounding technical. i.e. is it more
than just making a list of items? Are they the same thing? Please excuse my
'dah' factor, but it is really bugging me.

Willam Roberts

Joy to the world
Jul 17 '05 #1
5 2775
> To me, when you enumerate, you make a list of specific items, like
enumerating controls in a form. Am I missing something? I mean is there
something more to the meaning of the term "enumeration" or "enumerate" (in
programming context) other than just sounding technical. i.e. is it more
than just making a list of items? Are they the same thing? Please excuse my 'dah' factor, but it is really bugging me.


I don't agree with your opening sentence. To me, when you enumerate, you
**take an existing list** and go through it (i.e., count it) one line at a
time; you don't **make** the list. In VB, that definition broadens a little
bit. For example, you can enumerate the controls on a form using code
similar to this

Dim ctrl As Control
For Each ctrl In Controls
If ctrl.Name Like "My*" Then
Debug.Print ctrl.Name
End If
Next

What is happening here is that the For-Each statement is calling up the
controls contained in the Controls collection (which VB maintains
automatically for us), one at a time, looking to print out (in the Immediate
window) all those whose name starts with the letters "My".

Rick - MVP
Jul 17 '05 #2

"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:_c********************@comcast.com...
To me, when you enumerate, you make a list of specific items, like
enumerating controls in a form. Am I missing something? I mean is there
something more to the meaning of the term "enumeration" or "enumerate" (in programming context) other than just sounding technical. i.e. is it more
than just making a list of items? Are they the same thing? Please
excuse my
'dah' factor, but it is really bugging me.
I don't agree with your opening sentence. To me, when you enumerate, you
**take an existing list** and go through it (i.e., count it) one line at a
time; you don't **make** the list. In VB, that definition broadens a

little bit. For example, you can enumerate the controls on a form using code
similar to this

Dim ctrl As Control
For Each ctrl In Controls
If ctrl.Name Like "My*" Then
Debug.Print ctrl.Name
End If
Next

What is happening here is that the For-Each statement is calling up the
controls contained in the Controls collection (which VB maintains
automatically for us), one at a time, looking to print out (in the Immediate window) all those whose name starts with the letters "My".

Rick - MVP


So, enumureating does not mean making a list, rathers its going through one,
that makes sense!
Jul 17 '05 #3
Willam Roberts <Wi*********@hotmail.com> schreef in berichtnieuws
pQ******************@nwrddc02.gnilink.net...

Hello Willam,
To me, when you enumerate, you make a list of specific items, like
enumerating controls in a form. Am I missing something?
No, and yes. "To enumerate" is nothing more than "to count". You don't
*make* a list, you just go thru an allready existing one (Like Rick allready
mentioned).

Ofcourse, sometimes that list is somewhat hidden to the programmer's eye,
and/or you enumerate some list to retrieve some specific data outof it
(which you maybe use to store in a user-viewable form).

For example : think about enumerating entries outof a directory (using
"dir(filemask)" ). The list (directory-entries) is allready there, you just
retrieve them one-by-one, maybe storing (partial) results into a list- or
tree-view.
I mean is there
something more to the meaning of the term "enumeration" or "enumerate" (in
programming context) other than just sounding technical. i.e. is it more
than just making a list of items? Are they the same thing? Please excuse my 'dah' factor, but it is really bugging me.


You're excused. You do *not* want to know the number of questions I did say
"duh !" to when it was explained to me, and thereby the obviousness of it
became clear to me ( the world-famous 20-20 hindsight :-)

Regards,
Rudy Wieser

Jul 17 '05 #4
Thanks Rudy,

I appreciate your thoughts. You and Rick have helped me through one of my
weaknesses, i.e. at times I tend to make things over-complicated when I
strive to understand them.

Kind Regards,

William Roberts

"R.Wieser" <rw***************@xs4all.nl> wrote in message
news:3f***********************@dreader5.news.xs4al l.nl...
Willam Roberts <Wi*********@hotmail.com> schreef in berichtnieuws
pQ******************@nwrddc02.gnilink.net...

Hello Willam,
To me, when you enumerate, you make a list of specific items, like
enumerating controls in a form. Am I missing something?
No, and yes. "To enumerate" is nothing more than "to count". You don't
*make* a list, you just go thru an allready existing one (Like Rick

allready mentioned).

Ofcourse, sometimes that list is somewhat hidden to the programmer's eye,
and/or you enumerate some list to retrieve some specific data outof it
(which you maybe use to store in a user-viewable form).

For example : think about enumerating entries outof a directory (using
"dir(filemask)" ). The list (directory-entries) is allready there, you just retrieve them one-by-one, maybe storing (partial) results into a list- or
tree-view.
I mean is there
something more to the meaning of the term "enumeration" or "enumerate" (in programming context) other than just sounding technical. i.e. is it more
than just making a list of items? Are they the same thing? Please
excuse my
'dah' factor, but it is really bugging me.
You're excused. You do *not* want to know the number of questions I did

say "duh !" to when it was explained to me, and thereby the obviousness of it
became clear to me ( the world-famous 20-20 hindsight :-)

Regards,
Rudy Wieser

Jul 17 '05 #5
Willam Roberts <Wi*********@hotmail.com> schreef in berichtnieuws
l8*******************@nwrddc01.gnilink.net...

Hello William,
Thanks Rudy,

I appreciate your thoughts. You and Rick have helped me through one of my
weaknesses, i.e. at times I tend to make things over-complicated when I
strive to understand them.


You're welcome :-)

Regards,
Rudy Wieser

Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Max | last post by:
Suppose I have a simple type which is enumeration <xs:simpleType name="fontStyle"> <xs:restriction base="xs:string"> <xs:enumeration value="bold" /> <xs:enumeration value="italic" />...
3
by: Antoine Junod | last post by:
Hello, I definitely have a problem to build a clean data structure. I would be very happy if some of you could help me as well as in the past. Here is my problem: -> I have a list of...
3
by: Sampson | last post by:
I have a question about enumeration and how to populate them during runtime. I am using vb.net but will happily take any advice in c# as well. Here is an example to help illustrate what I am...
27
by: Ben Finney | last post by:
Antoon Pardon wrote: > I just downloaded your enum module for python > and played a bit with it. IMO some of the behaviour makes it less > usefull. Feedback is appreciated. I'm hoping to...
7
by: Nathan | last post by:
I'd like to use an enumeration as a datasource for a drop-down box. Is there a way to do this?
2
by: Charlie | last post by:
Hi: How would I bind a list to an enumeration so that enumeration value becomes list values and enumeration constants becomes list text? Do you loop through enum and add manually or is there a...
1
by: stran | last post by:
I'm trying to create a simple type that holds two different types. The first is IDREF and the second is an enumeration of string. When I generate a sample xml, I can enter any ID previously stated in...
3
by: scotchfx | last post by:
Is there any way of declaring an enumeration in a base class in such a way that it can be "overridden" in a derived class... for instance: class Base{ public: enum Enum { //empty }; } ...
6
by: Jan Sneeuwman | last post by:
Hello, I am working on a library in C++, and the library goes with a header file with a trailing comma at the end of some enumeration. Like this: enum Abc { ENUM_ONE, ENUM_TWO ENUM_THREE,...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.