Posts: 1
Threads: 1
Joined: Feb 2004
Hello there
I read a tutorial that said "By definition, a function is a subprogram designed to perform a specific task and return a value" ,the tutorial was about QBasic.
Quetsion 1: Is the statement correct?
Question 2: With regards to SubPrograms in QBasic, are Functions Subprograms or are Sub Procedures Subprograms? Or can they both be classified as Subprograms.
ayla Pepper
Posts: 6,419
Threads: 74
Joined: Mar 2002
1.- Yes
2.- SUBs are computer science's "Procedures". Some kind (but not the same) of C's void functions.
Posts: 144
Threads: 8
Joined: Feb 2004
Procedure now really means the same thing as function. At least in Java and C#.
Posts: 691
Threads: 5
Joined: Apr 2002
Quote:Procedure now really means the same thing as function. At least in Java and C#.
Technically, Java and C# have methods, not procedures or functions. This is because both languages are (close to) pure object orientation. All methods in a Java or C# program must act on an instance of an object.
esus saves.... Passes to Moses, shoots, he scores!
Posts: 144
Threads: 8
Joined: Feb 2004
Quote:PlayGGY Wrote:Procedure now really means the same thing as function. At least in Java and C#.
Technically, Java and C# have methods, not procedures or functions. This is because both languages are (close to) pure object orientation. All methods in a Java or C# program must act on an instance of an object.
Yes, that is what I was thinking of. You are right.
Posts: 3,279
Threads: 170
Joined: Nov 2003
In our VB class, this kind of thing should be taught...but it is not. And it really sucks coz none of the students except Rhiannon (of course, coz I can teach her on our free time) are "getting it".
I'd knock on wood, but my desk is particle board.