Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Subprograms
#1
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
Reply
#2
1.- Yes

2.- SUBs are computer science's "Procedures". Some kind (but not the same) of C's void functions.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#3
Procedure now really means the same thing as function. At least in Java and C#.
Reply
#4
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!
Reply
#5
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.
Reply
#6
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)