Component Pascal
   HOME

TheInfoList



OR:

Component Pascal is a
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
in the tradition of
Niklaus Wirth Niklaus Emil Wirth (born 15 February 1934) is a Swiss computer scientist. He has designed several programming languages, including Pascal (programming language), Pascal, and pioneered several classic topics in software engineering. In 1984, he w ...
's
Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Fren ...
,
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 fairies in 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, Queen of the Fair ...
and
Oberon-2 Oberon-2 is an extension of the original Oberon programming language that adds limited reflection and object-oriented programming facilities, open arrays as pointer base types, read-only field export, and reintroduces the FOR loop from Modula-2. ...
. It bears the name of the language
Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Fren ...
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 to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer progra ...
and built-in string support. Component Pascal was originally named Oberon/L, and was designed and supported by a small
ETH Zürich (colloquially) , former_name = eidgenössische polytechnische Schule , image = ETHZ.JPG , image_size = , established = , type = Public , budget = CHF 1.896 billion (2021) , rector = Günther Dissertori , president = Joël Mesot , ac ...
spin-off company named Oberon microsystems. They developed an
integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools a ...
(IDE) named
BlackBox Component Builder BlackBox Component Builder is an integrated development environment (IDE) optimized for component-based software development developed by a small spin-off company, Oberon microsystems AG, of ETH Zurich in Switzerland. The IDE consists of develop ...
. 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 The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
(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 ASP.NET Web Forms is a web application framework and one of several programming models supported by the Microsoft ASP.NET technology. Web Forms applications can be written in any programming language which supports the Common Language Runtime, s ...
way used in Microsoft's .NET 3.0 to access code in
Extensible Application Markup Language Extensible Application Markup Language (XAML ) is a declarative XML-based language that Microsoft developed for initializing structured values and objects. It is available under Microsoft's Open Specification Promise. XAML is used extensively ...
(XAML), which was released in 2008. An
open-source software Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose. Op ...
implementation of Component Pascal exists for the .NET 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 describes ...
(JVM) platforms, from the Gardens Point team around John Gough at
Queensland University of Technology Queensland University of Technology (QUT) is a public research university located in the urban coastal city of Brisbane, Queensland, Australia. QUT is located on two campuses in the Brisbane area viz. Gardens Point and Kelvin Grove. The univ ...
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 f ...
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 In computer science, extended Backus–Naur form (EBNF) is a family of metasyntax notations, any of which can be used to express a context-free grammar. EBNF is used to make a formal description of a formal language such as a computer programm ...
, 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 reflection and object-oriented programming facilities, open arrays as pointer base types, read-only field export, and reintroduces the FOR loop from Modula-2. ...
, 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.html" ;"title=";" DeclSeq 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")"____.html" ;"title="xprList")".html" ;"title="(" ("_[ExprList")"____">_IF_Expr_THEN_StatementSeq ________ ________[ELSE_StatementSeq ______END ____.html" ;"title="xprList")"">(" ____">_IF_Expr_THEN_StatementSeq ________ ________[ELSE_StatementSeq ______END ____">_CASE_Expr_OF_ ________Case_ ________[ELSE_StatementSeq ______END ____.html" ;"title="xprList")" "> IF Expr THEN StatementSeq _CASE_Expr_OF_ ________Case_ ________[ELSE_StatementSeq ______END ____">_WHILE_Expr_DO_StatementSeq_END ____.html" ;"title="LSE StatementSeq END "> CASE Expr OF Case [ELSE StatementSeq END "> WHILE Expr DO StatementSeq END "> REPEAT StatementSeq UNTIL Expr , FOR ident ":=" Expr TO Expr LOOP StatementSeq END , WITH _EXIT ____.html" ;"title="LSE StatementSeq END "> EXIT "> RETURN xpr____ Case_=_[CaseLabels__":"_StatementSeq CaseLabels_=_ConstExpr_[".."_ConstExpr.html" ;"title="aseLabels__":"_StatementSeq.html" ;"title="xpr Case = [CaseLabels ":" StatementSeq">xpr Case = [CaseLabels ":" StatementSeq CaseLabels = ConstExpr [".." ConstExpr">aseLabels__":"_StatementSeq.html" ;"title="xpr Case = [CaseLabels ":" 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 (colloquially) , former_name = eidgenössische polytechnische Schule , image = ETHZ.JPG , image_size = , established = , type = Public , budget = CHF 1.896 billion (2021) , rector = Günther Dissertori , president = Joël Mesot , a ...
), 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 A source-to-source translator, source-to-source compiler (S2S compiler), transcompiler, or transpiler is a type of translator that takes the source code of a program written in a programming language as its input and produces an equivalent sou ...
based on Josef Templ'
OFront
{{Modula, Oberon .NET programming languages Oberon programming language family Modula programming language family
Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Fren ...