psuedocode Flashcards

1
Q

comments

A

//

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

data types

A

integer
real
char
string
boolean
date

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

declaring variable

A

DECLARE <variable> : <datatype></datatype></variable>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

constants

A

CONSTANT <identifier> = <value></value></identifier>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

assignment

A

<identifier> <— <value>
</value></identifier>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

declaring arrays

A

1D
DECLARE <identifier> : ARRAY [lower:upper] OF <datatype>
2D
DECLARE <identifier> : ARRAY [lower1:upper1, lower2:upper2] OF <datatype></datatype></identifier></datatype></identifier>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

user defined data types

A

TYPE <identifier> = (value1, 2, 3…)
eg TYPE season = (spring, summer, autumn…)</identifier>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

non composite data type - pointer

A

TYPE IntPointer = ^INTEGER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

composite data type

A

TYPE <identifier>
DECLARE <identifier> : <datatype>
DECLARE <identifier> : <datatype>
END TYPE</datatype></identifier></datatype></identifier></identifier>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

input/ output

A

INPUT <identifier>
OUTPUT <value></value></identifier>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

arithmetic operations

A

+ - * / // %

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

relational operations

A

<
<=
=
<>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

logic operators

A

AND OR NOT NOR XOR NAND

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

if

A

IF <condition> THEN
<statement>
ELSE
<statement>
END IF</statement></statement></condition>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

CASE

A

CASE OF <identifier>
1 : <statement>
2 : <statement>

OTHERWISE <statement>
END CASE</statement></statement></statement></identifier>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

count controlled loop

A

FOR i <- <value> TO <value></value></value>

<statement>
NEXT i
</statement>

17
Q

condition controlled

A

REPEAT

<statement>
UNTIL <condition>

WHILE <condition>
<statement>
END WHILE
</statement></condition></condition></statement>

18
Q

procedures

A

PROCEDURE <identifier> (parameters : <data>)</data></identifier>

<statement>
END PROCEDURE

CALL <identifier> (parameters)
</identifier></statement>

19
Q

function

A

FUNCTION <identifier> (parameters : <data>) RETURNS <data></data></data></identifier>

<statement>
END FUNCTION
</statement>

20
Q

opening text files

A

OPEN FILE <identifier> FOR <mode>
modes are:
READ
WRITE
APPEND</mode></identifier>

21
Q

reading / writing fike

A

READ FILE <identifier>, <variable>
WRITE FILE <identifier>, <data></data></identifier></variable></identifier>

22
Q

end of file

A

EOF <identifier>
returns true if end and false if not</identifier>

23
Q

closing file

A

CLOSE FILE <identifier></identifier>

24
Q

moving pointer to a given location

A

SEEK< identifier>, <address>

25
Q

reads data from the record at the pointer

A

GET RECORD <identifier>, <variable></variable></identifier>

26
Q

inserting data into the record at the pointer

A

PUT RECORD <identifier>, <variable></variable></identifier>