Fichas
Chapter 4 Flash Cards
Fichas del conjunto (12)
- 1What is selection ?Selection is where the flow through a
program is interrupted and control is passed to another point in the program. The decision is based on a Boolean expression. - 2What is iteration ?Controlled by the state of a Boolean expression, a section of code is repeated.
- 3What is sequence ?The execution of statements one
after another. This usually forms
the bulk of the code in any program. - 4What is recursion ?When a procedure or function calls itself.
- 5What are the differences between a global and local variable ?A local variable is declared within a subprogram but a global variable is declared outside any subprograms; functions or procedures. A local variable is also only accessible within the subprogram it is declared in but a global variable is accessible to code written anywhere in the program.
- 6What are the requirements when defining a function ? There are 41: A function name.
2: Any parameters needed by the function; that is, the data that must be fed into the function.
3: The processing code itself.
4:The output - usually one output but
there can be zero or many outputs. - 7What does by value (by val) do ?It passes a copy of the original data to the
function and any changes made are lost as
soon as the function is no longer in use. - 8What does by reference (by ref) do ?It gives the actual memory address of where the data for the variable is being stored to the function.
- 9What is BRA ?BRA (Branch always): This is a jump instruction that is always executed.
- 10What is BRP ?BRP (Branch if positive): This is a jump instruction that occurs when
the value in the accumulator is positive. - 11What are the main differences between a function and a procedure ? The 2 main differencesA function must be written as part of an equation but a procedure does not have to. A function returns a value but a procedure does not have to.
- 12What is IDE ?IDE (Integrated development environment) is a text editor used for
writing source code and is also used as a debugger. It has Facilities for
automating the build and features to help with code writing, such
as pretty printing and code completion.
Información
- Descripción
- AS - Level Computing Science Fichas sobre Chapter 4 Flash Cards, creado por Karl Taylor el 11/10/2016.
- Creado por
- Karl Taylor · oct 2016
- Actualizado
- 14 oct 2016
- Visitas
- 4
- Valoración