steveeem
Badges: 14
Rep:
?
#1
Report Thread starter 2 years ago
#1
So im doing ocr as level computer science and ive just looked at functions and procedures again. My textbook says that a function must return a value, but a procedure doesn't have to. However in a youtube video it said that a procedure could display a high score table without returning a value. So now im confused as to what returning a value means, i initially thought it meant displaying something, like printing something but this makes me realise im wrong. So what does returning a value actually mean?
0
reply
TSR Jessica
Badges: 19
Rep:
?
#2
Report 2 years ago
#2
Sorry you've not had any responses about this. Are you sure you've posted in the right place? Here's a link to our subject forum which should help get you more responses if you post there.
0
reply
G.D.R
Badges: 8
Rep:
?
#3
Report 2 years ago
#3
Both functions and procedures are subroutines, like you said functions will return a value while procedures will not. By it returning a value it can be anything and it is done by the value then taking the function name (this is python) , what the YT vid was saying was within the procedure it will 'print' / output the values without returning a value to the main program
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Are you travelling in the Uni student travel window (3-9 Dec) to go home for Christmas?

Yes (111)
28.1%
No - I have already returned home (51)
12.91%
No - I plan on travelling outside these dates (79)
20%
No - I'm staying at my term time address over Christmas (39)
9.87%
No - I live at home during term anyway (115)
29.11%

Watched Threads

View All