Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    1
    ReputationRep:
    Hey there,

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

    To which the markscheme answers:


    So, a procedure is a subroutine which returns values?

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

    And here's the answer:


    "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?
    Offline

    2
    ReputationRep:
    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


    • Thread Starter
    Offline

    1
    ReputationRep:
    (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.

    The fact that they are unspecific about this in the mark-schemes is worrying.
    Offline

    2
    ReputationRep:
    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.
    Offline

    0
    ReputationRep:
    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
    Offline

    17
    ReputationRep:
    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.
 
 
 
  • 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.

  • Poll
    What's your favourite Christmas sweets?
  • 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.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.