Qbasicnews.com
Subprograms - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: General (http://qbasicnews.com/newforum/forum-6.html)
+--- Forum: General/Misc (http://qbasicnews.com/newforum/forum-18.html)
+--- Thread: Subprograms (/thread-3244.html)



Subprograms - LaylaPepper - 02-19-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.


Subprograms - na_th_an - 02-19-2004

1.- Yes

2.- SUBs are computer science's "Procedures". Some kind (but not the same) of C's void functions.


Subprograms - PlayGGY - 02-19-2004

Procedure now really means the same thing as function. At least in Java and C#.


Subprograms - LooseCaboose - 02-20-2004

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.


Subprograms - PlayGGY - 02-20-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.


Subprograms - adosorken - 02-20-2004

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".