Enumeration vs making a list

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Willam Roberts

    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 "enumeratio n" 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


  • Rick Rothstein

    #2
    Re: Enumeration vs making a list

    > To me, when you enumerate, you make a list of specific items, like[color=blue]
    > enumerating controls in a form. Am I missing something? I mean is there
    > something more to the meaning of the term "enumeratio n" 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[/color]
    my[color=blue]
    > 'dah' factor, but it is really bugging me.[/color]

    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


    Comment

    • Willam Roberts

      #3
      Re: Enumeration vs making a list


      "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> wrote in message
      news:_cScnVsUgs QxvOKiXTWJhQ@co mcast.com...[color=blue][color=green]
      > > 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 "enumeratio n" or "enumerate"[/color][/color]
      (in[color=blue][color=green]
      > > 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[/color][/color]
      excuse[color=blue]
      > my[color=green]
      > > 'dah' factor, but it is really bugging me.[/color]
      >
      > 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[/color]
      little[color=blue]
      > 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[/color]
      Immediate[color=blue]
      > window) all those whose name starts with the letters "My".
      >
      > Rick - MVP
      >
      >[/color]

      So, enumureating does not mean making a list, rathers its going through one,
      that makes sense!


      Comment

      • R.Wieser

        #4
        Re: Enumeration vs making a list

        Willam Roberts <WilliamR104@ho tmail.com> schreef in berichtnieuws
        pQEfb.12499$3b7 .9650@nwrddc02. gnilink.net...

        Hello Willam,
        [color=blue]
        > To me, when you enumerate, you make a list of specific items, like
        > enumerating controls in a form. Am I missing something?[/color]

        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(filema sk)" ). The list (directory-entries) is allready there, you just
        retrieve them one-by-one, maybe storing (partial) results into a list- or
        tree-view.
        [color=blue]
        > I mean is there
        > something more to the meaning of the term "enumeratio n" 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[/color]
        my[color=blue]
        > 'dah' factor, but it is really bugging me.[/color]

        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



        Comment

        • Willam Roberts

          #5
          Re: Enumeration vs making a list

          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" <rwieser-killthis-@xs4all.nl> wrote in message
          news:3f7f2758$0 $13928$e4fe514c @dreader5.news. xs4all.nl...[color=blue]
          > Willam Roberts <WilliamR104@ho tmail.com> schreef in berichtnieuws
          > pQEfb.12499$3b7 .9650@nwrddc02. gnilink.net...
          >
          > Hello Willam,
          >[color=green]
          > > To me, when you enumerate, you make a list of specific items, like
          > > enumerating controls in a form. Am I missing something?[/color]
          >
          > 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[/color]
          allready[color=blue]
          > 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(filema sk)" ). The list (directory-entries) is allready there, you[/color]
          just[color=blue]
          > retrieve them one-by-one, maybe storing (partial) results into a list- or
          > tree-view.
          >[color=green]
          > > I mean is there
          > > something more to the meaning of the term "enumeratio n" or "enumerate"[/color][/color]
          (in[color=blue][color=green]
          > > 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[/color][/color]
          excuse[color=blue]
          > my[color=green]
          > > 'dah' factor, but it is really bugging me.[/color]
          >
          > You're excused. You do *not* want to know the number of questions I did[/color]
          say[color=blue]
          > "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
          >
          >
          >[/color]


          Comment

          • R.Wieser

            #6
            Re: Enumeration vs making a list

            Willam Roberts <WilliamR104@ho tmail.com> schreef in berichtnieuws
            l84gb.48901$ZR1 .32700@nwrddc01 .gnilink.net...

            Hello William,
            [color=blue]
            > 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.[/color]

            You're welcome :-)

            Regards,
            Rudy Wieser



            Comment

            Working...