Component Pascal
   HOME

TheInfoList



OR:

Component Pascal is a
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
in the tradition of
Niklaus Wirth Niklaus Emil Wirth ( IPA: ) (15 February 1934 – 1 January 2024) was a Swiss computer scientist. He designed several programming languages, including Pascal, and pioneered several classic topics in software engineering. In 1984, he won the Tu ...
's Pascal,
Modula-2 Modula-2 is a structured, procedural programming language developed between 1977 and 1985/8 by Niklaus Wirth at ETH Zurich. It was created as the language for the operating system and application software of the Lilith personal workstation. It w ...
,
Oberon Oberon () is a king of the fairy, fairies in Middle Ages, medieval and Renaissance literature. He is best known as a character in William Shakespeare's play ''A Midsummer Night's Dream'', in which he is King of the Fairies and spouse of Titania ...
and
Oberon-2 Oberon-2 is an extension of the original Oberon programming language that adds limited reflective programming (reflection) and object-oriented programming facilities, open arrays as pointer base types, read-only field export, and reintroduces th ...
. It bears the name of the language Pascal and preserves its heritage, but is incompatible with Pascal. Instead, it is a minor variant and refinement of Oberon-2 with a more expressive
type system In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a ''type'' (for example, integer, floating point, string) to every '' term'' (a word, phrase, or other set of symbols). Usu ...
and built-in
string String or strings may refer to: *String (structure), a long flexible structure made from threads twisted together, which is used to tie, bind, or hang other objects Arts, entertainment, and media Films * ''Strings'' (1991 film), a Canadian anim ...
support. Component Pascal was originally named Oberon/L, and was designed and supported by a small
ETH Zürich ETH Zurich (; ) is a public university in Zurich, Switzerland. Founded in 1854 with the stated mission to educate engineers and scientists, the university focuses primarily on science, technology, engineering, and mathematics. ETH Zurich ra ...
spin-off company named Oberon microsystems. They developed an
integrated development environment An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
(IDE) named BlackBox Component Builder. Since 2014, development and support has been taken over by a small group of volunteers. The first version of the IDE was released in 1994, as ''Oberon/F''. At the time, it presented a novel approach to
graphical user interface A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
(GUI) construction based on editable forms, where fields and command buttons are linked to exported variables and executable procedures. This approach bears some similarity to the code-behind way used in Microsoft's .NET 3.0 to access code in Extensible Application Markup Language (XAML), which was released in 2008. An
open-source software Open-source software (OSS) is Software, computer software that is released under a Open-source license, license in which the copyright holder grants users the rights to use, study, change, and Software distribution, distribute the software an ...
implementation of Component Pascal exists for the
.NET The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
and
Java virtual machine A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally descr ...
(JVM) platforms, from the Gardens Point team around John Gough at
Queensland University of Technology The Queensland University of Technology (QUT) is a public university, public research university located in the city of Brisbane in Queensland, Australia. It has two major campuses, a modern city campus in Gardens Point, Brisbane, Gardens Point ...
in Australia. On 23 June 2004 Oberon microsystems announced that the BlackBox Component Builder was made available as a free download and that an open-source version was planned. The beta open-source version was initially released in December 2004 and updated to a final v1.5 release in December 2005. It includes the complete source code of the IDE, compiler, debugger, source analyser, profiler, and interfacing libraries, and can also be downloaded from their website. Several release candidates for v1.6 appeared in the years 2009–2011, the latest one (1.6rc6) appeared on Oberon microsystems web pages in 2011. At the end of 2013, Oberon microsystems released the final release 1.6. It is probably the last release bundled by them. A small community took over the ongoing development. BlackBox Component Pascal uses the extensions .odc (''Oberon document) ''for document files, such as source files, and .osf ''(Oberon symbol file'') for symbol files while Gardens Point Component Pascal uses .cp for source and .cps for symbol files. BlackBox Component Pascal has its own executable and loadable object format .ocf (''Oberon code file''); it includes a runtime linking loader for this format. The document format (.odc) is a rich text binary format, which allows formatting, supports conditional folding, and allows active content to be embedded in the source text. It also handles
user interface In the industrial design field of human–computer interaction, a user interface (UI) is the space where interactions between humans and machines occur. The goal of this interaction is to allow effective operation and control of the machine fro ...
elements in editable forms. This is in the tradition of the Oberon Text format.


Syntax

The full syntax for CP, as given by the Language Report, is shown below. In the
extended Backus–Naur form Extension, extend or extended may refer to: Mathematics Logic or set theory * Axiom of extensionality * Extensible cardinal * Extension (model theory) * Extension (proof theory) * Extension (predicate logic), the set of tuples of values ...
, only 34 grammatical productions are needed, one more than for
Oberon-2 Oberon-2 is an extension of the original Oberon programming language that adds limited reflective programming (reflection) and object-oriented programming facilities, open arrays as pointer base types, read-only field export, and reintroduces th ...
, although it is a more advanced language. Module = MODULE ident ";" mportListDeclSeq EGIN StatementSeq LOSE StatementSeq END ident ".". ImportList = IMPORT dent ":="ident ";". DeclSeq = . ConstDecl = IdentDef "=" ConstExpr. TypeDecl = IdentDef "=" Type. VarDecl = IdentList ":" Type. ProcDecl = PROCEDURE eceiverIdentDef ormalParsMethAttributes EGIN StatementSeq END ident">;" DeclSeq EGIN StatementSeq END ident MethAttributes = ," NEW EMPTY , EXTENSIBLE) ForwardDecl = PROCEDURE "^" eceiverIdentDef ormalParsMethAttributes. FormalPars = "(" PSection ")" :" Type FPSection = IN , OUTident ":" Type. Receiver = "(" INident ":" ident ")". Type = Qualident , ARRAY onstExpr OF Type , EXTENSIBLE , LIMITEDRECORD ("Qualident")"FieldList END , POINTER TO Type , PROCEDURE ormalPars FieldList = dentList ":" Type StatementSeq = Statement . Statement = Designator (" [ExprList")" "> IF Expr THEN StatementSeq CASE Expr OF Case WHILE Expr DO StatementSeq END "> REPEAT StatementSeq UNTIL Expr , FOR ident ":=" Expr TO Expr LOOP StatementSeq END , WITH EXIT "> RETURN xpr Case = [CaseLabels ":" StatementSeq CaseLabels = ConstExpr [".." ConstExpr">aseLabels ":" StatementSeq">xpr Case = [CaseLabels ":" StatementSeq CaseLabels = ConstExpr [".." ConstExpr Guard = Qualident ":" Qualident. ConstExpr = Expr. Expr = SimpleExpr [Relation SimpleExpr]. SimpleExpr = ["+" , "-"] Term . Term = Factor . Factor = Designator , number , character , string , NIL , Set , "(" Expr ")" , " ~ " Factor. Set = "". Element = Expr [".." Expr]. Relation = "=" , "#" , "<" , "<=" , ">" , ">=" , IN , IS. AddOp = "+" , "-" , OR. MulOp = "*" , "/" , DIV , MOD , "&". Designator = Qualident "$" ExprList = Expr . IdentList = IdentDef . Qualident = dent "."ident. IdentDef = ident "-"


References


Further reading


From Modula to Oberon
Wirth (1990)
The Programming Language Oberon
Wirth (1990)
Differences between Oberon and Oberon-2
Mössenböck and Wirth (1993)
The Programming Language Oberon-2
H. Mössenböck, N. Wirth, Institut für Computersysteme, ETH Zürich ( ETHZ), January 1992.
What's New in Component Pascal
(changes from Oberon-2 to CP), Pfister (2001)
Components and Objects Together
Clemens Szyperski, Dr.Dobbs, May, 1999


External links

*

see als
historical notes on the download pageGardens Point Component Pascal
for .NET & JVM
Component Pascal to C
transpiler based on Josef Templ'
OFront
{{Modula, Oberon .NET programming languages Oberon programming language family Modula programming language family Pascal