Glancing at Variables, Data Types, and Operators
A variable must be declared at the beginning of the statement in which it’s used before any executable statement (such executable statements are called sentences). A declaration (or a qualification, as it’s known in the original Simula documentation) includes the name and the data type.
The set of primitive data types in Simula is almost standard for its time. It has INTEGER numbers (26, -12), REAL numbers (3.14159, 2E-8), BOOLEAN constants (TRUE and FALSE), and EBCDIC CHARACTER (’*’). Explicit type conversion is not supported.
Operators in Simula generally behave as you would expect. Many operators come in two forms: “classical” ALGOL-60 (with non-EBCDIC characters) and “modern” (only with ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access