[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Some modules from Modula-2
Here is the list of modules from the Modula-2 DIS (June 1994) that we
could adopt for the OOC lib:
LowReal, LowLong
Give access to the underlying properties of the types REAL and
LONGREAL. Defines constants like radix, expoMin, expoMax, large,
small, etc. Provides functions to access various parts of a real
number, to synthesize a real, get the next higher/lower real number,
etc.
CharClass
Some predicates on characters (IsNumeric, IsLetter, IsUpper, etc).
RealMath, LongMath
A subset of the defintion module Michael G. posted last week.
Strings
A superset of Oakwood Strings except that Cap turnes into Capitalize
and Pos into FindNext/FindPrev. Addtionally provides a number of
predicates to test wheter the procedures like Delete, Insert, etc
have valid input and do not truncate the output.
WholeStr, RealStr, LongStr
String to number conversion and vice versa. WholeStr should be
dubbed IntStr, since O2 has no cardinal types.
WholeConv, RealConv, LongConv
Low-level string conversion procedures for the numeric types.
SysClock
Getting and setting the system clock, predicates to test whether one
of the former is possible. Defines `DateTime' record.
These aren't that many modules, but they cover some of the most
important stuff. Especially the real <-> string conversion functions
are tricky. I don't see any reason why we shouldn't use the above
mentioned module defintions for OOC. We can only benefit from the
precise specifications in the Modula-2 Draft International Standard.
-- mva