You are Here: Home

# A2 OCR Computing - What is a procedure/function?

Announcements Posted on
Four hours left to win £100 of Amazon vouchers!! Don't miss out! Take our short survey to enter 24-10-2016
1. Hey there,

I just saw this question on the F453 June 2012 paper:

So, a procedure is a subroutine which returns values?

Here's a question from the June 2011 F452 paper:

"A procedure does not return a value"

What the...? How the heck am I supposed to get marks for this in the exam, when the specification apparently switches between answers?
2. basically....

A procedure is a type of subroutine which returns either no OR multiple values
A function is a type of subroutine which always only returns a single value

3. (Original post by IMissTheTruckles)
basically....

A procedure is a type of subroutine which returns either no OR multiple values
A function is a type of subroutine which always only returns a single value

The mark-scheme allows for saying one value...

How does returning multiple values work in programming? Surely if one value is returned, then the procedure stops. The only way I see it KIND OF making sense, is if you returned a tuple of values (e.g. return 5, 3, 2), but then it's arguable that you have simply returned a single tuple, and hence one value.

4. I assume your talking about the 'may return value(s)' in the first question, I believe thats intended to mean if may or may not return a value meaning it might not return any. True it is quite unspecific and I always hate this question because of how confusing the marks are for it.

As for returning multiple values you can return multiple single values it doesn't need to be an array so thats not a problem.
5. Technically a procedure, PRODUCES a value, but most OCR definitions show that an acceptable answer is that it may OR may not return/produce a value. As long as you make this fact clear, I'm fairly certain that a marker will give you a mark. Also bear in mind that this particular fact is usually only 1 mark.
How are you feeling about the rest of the paper?
Honestly I'm finding it really easy and am willing to help
6. Technically there is no difference between a subroutine and function. They are both the same thing. But your exam board doesn't want to hear that.

## Register

Thanks for posting! You just need to create an account in order to submit the post
1. this can't be left blank
2. this can't be left blank
3. this can't be left blank

6 characters or longer with both numbers and letters is safer

4. this can't be left empty
1. Oops, you need to agree to our Ts&Cs to register

Updated: May 8, 2016
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Today on TSR

### Who is getting a uni offer this half term?

Find out which unis are hot off the mark here

Poll
Useful resources