Save
...
incomplete
computer science
data structures
Save
Share
Learn
Content
Leaderboard
Learn
Created by
lucy dock
Visit profile
Cards (13)
arrays
are lists of values that are grouped together
in an
array
, all items should be the same
data type
data types
string
– any amount of text (letters, numbers and symbols)
integer
– a whole number
real
– a number with a part after the decimal point
character
– one single ‘character’ of a string i.e. a letter, number, symbol
boolean
– True or False
pseudocode for length of a string
LEN
(
String
)
pseudocode for character
position
POSITION
(
String
,
Char
)
pseudocode for substring
SUBSTRING
(
FirstPosition
,
LastPosition
,
String
)
pseudocode for concatenation
String1
+
String2
pseudocode for encoding characters
CHAR
_
TO
_
CODE
(Character)
pseudocode for decoding characters
CODE_TO_CHAR(Integer)
pseudocode for converting string to integer
STRING
_
TO
_
INT
(
String
)
pseudocode for converting string to real
STRING
_
TO
_
REAL
(
String
)
pseudocode for converting integer to string
INT_TO_STRING(Integer)
pseudocode for converting realto string
REAL_TO_STRING(Real)
a record
similar to an
array
but all of the items don’t need to be the same type
individual
data items within a record are known as
fields
instead of accessing the data using the
index
, we would access it using the
field name
instead