Algol68 Now Accepts FLOOR As Synonym for ENTIER
The Algol68 frontend now recognizes `FLOOR` as an alternative name for the `ENTIER` operator, which rounds a real number towards negative infinity.
The Algol68 language had a built-in operator called ENTIER that produced the greatest integer less than or equal to a real number. This commit adds FLOOR as a synonym. Users who are more familiar with FLOOR can now use it in their Algol68 code without any semantic change.
In Details
Algol68 is an imperative programming language. The operator ENTIER (specified in the Revised Report{10.2.3.4.r}) returns the greatest integer less than or equal to its real argument. This commit introduces FLOOR as a synonym, updating a68-parser-prelude.cc to map FLOOR(L real):L int to ENTIER(L real):L int. The change doesn't alter the semantics of existing code but enhances usability for programmers familiar with the term FLOOR.
For Context
Algol68 is a programming language with a history dating back to the 1960s. Like other languages, it provides operators for common mathematical operations. One such operator, ENTIER, rounds a real number down to the nearest integer (towards negative infinity). This commit adds a new name, FLOOR, for the existing ENTIER operator. This means developers can now use FLOOR and ENTIER interchangeably to perform the same rounding operation, bringing Algol68 in line with more modern terminology.