Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Routines, methods, procedures and functions

Routines, methods, procedures and functions

Scheduled Pinned Locked Moved The Lounge
question
26 Posts 18 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P peterchen

    you pronounced them the wrong way round.

    We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
    blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist

    M Offline
    M Offline
    Mark Salsbery
    wrote on last edited by
    #17

    Aussies... :rolleyes: ;)

    Mark Salsbery Microsoft MVP - Visual C++ :java:

    1 Reply Last reply
    0
    • R Rei Miyasaka

      People use these words interchangeably. It confuses students. How would you define them? How do they differ?

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #18

      Routine, n., a set of instructions executed to perform a specific task. Subroutine, n., a routine invoked in some fashion from another routine, with a mechanism to return control to the calling location when the subroutine has finished. Subroutines may be referenced by address, line number, or a symbolic name depending on the language and system in use. Procedure, n., see Routine Function, n., a subroutine, invoked by name, that returns a value but does not otherwise alter the state of the system. Also another name for a subroutine in C and C-like languages. Method, n., in Object-Oriented Programming: a subroutine, invoked by name and context (object). Methods are generally used to retrieve information about the context object, or to modify it in some way, although they may do neither, instead acting as functions (in OO systems that do not provide a means of defining functions, this practice may be used to simulate them).

      L 1 Reply Last reply
      0
      • R Rei Miyasaka

        Been eating lots of beans today, I see.

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #19

        No, as others have said, a method, and a procedure are the same thing. Even a function is the same thing, if it's inside a class, it's a *member* function. And a routine, I've not heard them called that by anyone for a long time.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        R 1 Reply Last reply
        0
        • P PIEBALDconsult

          John C wrote:

          And nude and NAKED

          Yeah, naked requires an observer. You may be sunning yourself nude in your backyard and suddenly find yourself naked when a neighbour greets you over the fence.

          John C wrote:

          When everyone is a hero no one is a hero.

          Or, from Gilbert and Sullivan's, "The Gondoliers" -- "When everyone is somebody then no one's anybody."

          R Offline
          R Offline
          Rei Miyasaka
          wrote on last edited by
          #20

          My Performing Arts prof would argue differently :) He'd say that a nude figure is objectified. Not that I agree with much of what he says...

          1 Reply Last reply
          0
          • R Rei Miyasaka

            People use these words interchangeably. It confuses students. How would you define them? How do they differ?

            P Offline
            P Offline
            Paul Conrad
            wrote on last edited by
            #21

            reinux wrote:

            How do they differ?

            Not different at all as all the others have said.

            "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon

            1 Reply Last reply
            0
            • S Shog9 0

              Routine, n., a set of instructions executed to perform a specific task. Subroutine, n., a routine invoked in some fashion from another routine, with a mechanism to return control to the calling location when the subroutine has finished. Subroutines may be referenced by address, line number, or a symbolic name depending on the language and system in use. Procedure, n., see Routine Function, n., a subroutine, invoked by name, that returns a value but does not otherwise alter the state of the system. Also another name for a subroutine in C and C-like languages. Method, n., in Object-Oriented Programming: a subroutine, invoked by name and context (object). Methods are generally used to retrieve information about the context object, or to modify it in some way, although they may do neither, instead acting as functions (in OO systems that do not provide a means of defining functions, this practice may be used to simulate them).

              L Offline
              L Offline
              leppie
              wrote on last edited by
              #22

              You forgot lambda ;P

              xacc.ide - now with IronScheme support
              IronScheme - 1.0 alpha 1 out now

              S 1 Reply Last reply
              0
              • C Christian Graus

                No, as others have said, a method, and a procedure are the same thing. Even a function is the same thing, if it's inside a class, it's a *member* function. And a routine, I've not heard them called that by anyone for a long time.

                Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                R Offline
                R Offline
                Rajesh R Subramanian
                wrote on last edited by
                #23

                Christian Graus wrote:

                And a routine, I've not heard them called that by anyone for a long time.

                Have you stopped programming in FORTRAN?

                Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                C 1 Reply Last reply
                0
                • R Rei Miyasaka

                  People use these words interchangeably. It confuses students. How would you define them? How do they differ?

                  G Offline
                  G Offline
                  Gary R Wheeler
                  wrote on last edited by
                  #24

                  For me, it's programming language dependent: Routine: Only for assembly language, FORTRAN, and command line batch files. Yes, I consider batch files programming, at least for purposes of this discussion. Method: C++ functions within a class, or COM methods within an interface. I don't C# (I'm near-sighted) or Java, but I imagine they're equivalent. Procedure: Pascal or Ada; any language that distinguishes between routines that return a value and those that don't. Procedures don't return a value, and can't be used on the right hand side of an assignment. Function: C/C++, or any language where a piece of code returns a value that can be used in a right hand side expression.

                  Software Zen: delete this;
                  Fold With Us![^]

                  1 Reply Last reply
                  0
                  • R Rajesh R Subramanian

                    Christian Graus wrote:

                    And a routine, I've not heard them called that by anyone for a long time.

                    Have you stopped programming in FORTRAN?

                    Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                    C Offline
                    C Offline
                    Christian Graus
                    wrote on last edited by
                    #25

                    I skipped that entirely. Thankfully.

                    Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                    1 Reply Last reply
                    0
                    • L leppie

                      You forgot lambda ;P

                      xacc.ide - now with IronScheme support
                      IronScheme - 1.0 alpha 1 out now

                      S Offline
                      S Offline
                      Shog9 0
                      wrote on last edited by
                      #26

                      Heh, i thought about mentioning closures, but couldn't think of a simple description. :-O

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups