Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Modula-3
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Standard library features== Continuing a trend started with the [[C (programming language)|C]] language, many of the features needed to write real programs were left out of the language definition and instead provided via a [[standard library]] set. Most of the interfaces below are described in detail in<ref name=DecSrcRr113>[http://apotheca.hpl.hp.com/ftp/pub/dec/SRC/research-reports/SRC-113.pdf Some Useful Modula-3 Interfaces] {{Webarchive|url=https://web.archive.org/web/20160304040009/http://apotheca.hpl.hp.com/ftp/pub/dec/SRC/research-reports/SRC-113.pdf |date=2016-03-04 }} Jim Horning, Bill Kalsow, Paul McJones, Greg Nelson. [[DEC Systems Research Center]] (SRC) Research Report 113 (December 1993)</ref> Standard libraries providing the following features. These are called standard interfaces and are required (must be provided) in the language. * Text: Operations on immutable string references, called <code>TEXT</code>s * Thread: Operations relating to threading, including <code>MUTEX</code>, condition variable, and thread pausing. The threading library provides pre-emptive threads switching * Word: Bitwise operations on unsigned integers (or machine words). Normally implemented directly by the compiler * Floating-point interfaces Some recommended interfaces implemented in the available implementations but are not required * Lex: For parsing number and other data * Fmt: Formatting various datatypes for printing * Pkl (or Pickle): [[Object serialization]] of any reference types reachable by the garbage collector * Table: Generic modules for [[Map (computer science)|maps]] As in C, I/O is also provided via libraries, in Modula-3 called <code>Rd</code> and <code>Wr</code>. The object-oriented design of the Rd (readers) and Wr (writers) libraries is covered in detail in the book by Greg Nelson. An interesting aspect of Modula-3 is that it is one of few programming languages which standard libraries have been formally verified not to contain various types of bugs, including locking bugs. This was done under the auspices of the Larch/Modula-3 (see [[Larch family]])<ref name=DecSrcRr072>[http://apotheca.hpl.hp.com/ftp/pub/dec/SRC/research-reports/SRC-072.pdf LM3] {{Webarchive|url=https://web.archive.org/web/20160303215535/http://apotheca.hpl.hp.com/ftp/pub/dec/SRC/research-reports/SRC-072.pdf |date=2016-03-03 }} Kevin D. Jones. [[DEC Systems Research Center]] (SRC) Research Report 72 (June 1991)</ref> and [[Extended static checking]]<ref name=CompaqSrcRr159>[http://apotheca.hpl.hp.com/ftp/pub/dec/SRC/research-reports/SRC-159.pdf Extended Static Checking] {{Webarchive|url=https://web.archive.org/web/20170705054838/http://apotheca.hpl.hp.com/ftp/pub/dec/SRC/research-reports/SRC-159.pdf |date=2017-07-05 }} David L. Detlefs, K. Rustan M. Leino, Greg Nelson, [[James B. Saxe]]. Compaq SRC Research Report 159 (December 1998)</ref> projects at [[DEC SRC|DEC Systems Research Center]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)