17.01.2015 Views

129761-2015-syllabus

129761-2015-syllabus

129761-2015-syllabus

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Syllabus content<br />

2.3.6 Structured programming<br />

• use a procedure<br />

• explain where in the construction of an algorithm it would be appropriate to use a procedure<br />

○ given pseudocode will use the following structure for procedure definitions:<br />

PROCEDURE <br />

<br />

ENDPROCEDURE<br />

○<br />

a procedure may have none, one or more parameters<br />

○ a parameter can be passed by reference or by value<br />

• show understanding of passing parameters by reference<br />

PROCEDURE (BYREF : )<br />

<br />

ENDPROCEDURE<br />

• show understanding of passing parameters by value<br />

PROCEDURE (BYVALUE : )<br />

<br />

ENDPROCEDURE<br />

○ a call is made to the procedure using CALL ()<br />

• use a function<br />

• explain where in the construction of an algorithm it is appropriate to use a function<br />

• use the terminology associated with procedures and functions: procedure/function header,<br />

procedure/function interface, parameter, argument, return value<br />

○ given pseudocode will use the following structure for function definitions:<br />

FUNCTION RETURNS // function has no<br />

parameters<br />

<br />

ENDFUNCTION<br />

FUNCTION (: )<br />

RETURNS // function has one or more parameters<br />

<br />

ENDFUNCTION<br />

○ a function is used in an expression, for example<br />

– x ← SQRT(n)<br />

– WHILE NOT EOF()<br />

• write programs containing several components and showing good use of resources<br />

30 Cambridge International AS and A Level Computer Science 9608. Syllabus for examination in <strong>2015</strong>.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!