# Pseudocode for Userdefined Data Types

In the pseudocode guide for my syllabus, an example of a record data type is given as below:

TYPE Student
DECLARE Surname : STRING
DECLARE FirstName : STRING
DECLARE DateOfBirth : DATE
DECLARE YearGroup : INTEGER
DECLARE FormGroup : CHAR
ENDTYPE


However, for enums and pointers it gives the following examples:

TYPE Planet = (Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune)

TYPE Pointer = ^<Type name>


There seem to be 2 inconsistencies here: the lack of the opening/closing "tag" structure from the record type, and also the use of equals signs in the enum and pointer examples.

I'n not sure if there is a conceptual difference between these types of types which explains the difference, of if it is due to an oversight on the writers of the guide.

Could someone please clarity this for me and explain the conceptual difference if there is one?

• We can only guess the intent of your teacher. You should ask them. – Raphael Jan 20 at 10:31
• FWIW, I think Student is a "record" whereas Planet is an "enum". Pointer seems to be a mix of definining syntax and a type with a type parameter; I'm not convinved by that choice of notation. – Raphael Jan 20 at 10:32
• It's the official pseudocode guide for the course. Not a teacher's idiosyncrasy – Robin Jan 20 at 10:39
• And who do you think wrote this guide? – Raphael Jan 20 at 12:25
• If the specific publication is that relevant, please give a proper reference in your question. That being said, all teaching material is written by teachers who are humans with opinions, tastes, and who can make mistakes. Generally, nothing is more dangerous in higher learning than assuming your teacher is infallible. As such, questions of this type are hard to answer: there is no single truth about notation, and nobody but the original author can really know their intent. – Raphael Jan 20 at 21:05