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
Component Pascal
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!
{{Short description|Programming language}} {{Use dmy dates|date=June 2022}} {{Infobox programming language | name = Component Pascal | logo = | paradigms = [[Imperative programming|Imperative]], [[Structured programming|structured]], [[Modular programming|modular]], [[Object-oriented programming|object-oriented]] | family = [[Niklaus Wirth|Wirth]] Oberon | designer = <!-- [[human name]] --> | developer = Oberon microsystems | released = {{Start date and age|1997}} | latest release version = | latest release date = <!-- {{Start date and age|20yy|mm|dd|df=yes}} --> | typing = [[Strong and weak typing|Strong]], [[Static typing|static]] | scope = [[Scope (computer science)|Lexical]] | programming language = | platform = <!-- [[link name]] --> | operating system = <!-- [[link name]] --> | license = | file ext = | file format = <!-- or: | file formats = --> | website = {{URL|blackboxframework.org}} | implementations = | dialects = | influenced by = [[Pascal (programming language)|Pascal]], [[Oberon (programming language)|Oberon]], [[Oberon-2]] | influenced = }} '''Component Pascal''' is a [[programming language]] in the tradition of [[Niklaus Wirth]]'s [[Pascal (programming language)|Pascal]],<ref>{{Cite book |last1=Jensen |first1=Kathleen |last2=Wirth |first2=Niklaus |author2-link=Niklaus Wirth |date=1974–1991<!-- 1974, 1985, 1991 --> |title=Pascal: User Manual And Report |publisher=Springer Verlag |isbn=978-0-387-97649-5<!-- 1991 -->}}</ref> [[Modula-2]],<ref>{{Cite book |last=Wirth |first=Niklaus |author-link=Niklaus Wirth |date=1982–1985<!-- 1982, 1983, 1985 --> |title=Programming in Modula-2 |publisher=Springer Verlag |isbn=978-3-540-15078-7}}</ref> [[Oberon (programming language)|Oberon]]<ref>{{Cite book |last1=Reiser |first1=Martin |last2=Wirth |first2=Niklaus |author2-link=Niklaus Wirth |date=1 June 1992 |title=Programming in Oberon: Steps Beyond Pascal and Modula |publisher=[[Addison-Wesley]] |isbn=978-0201565430}} [http://www.inf.ethz.ch/personal/wirth/books/ProgInOberon.pdf PDF (334 KB)] {{Webarchive|url=https://web.archive.org/web/20120603011509/http://www.inf.ethz.ch/personal/wirth/books/ProgInOberon.pdf |date=3 June 2012}}</ref><ref>{{Cite book |last1=Wirth |first1=Niklaus |author1-link=Niklaus Wirth |last2=Gutknecht |first2=Jürg |author2-link=Jürg Gutknecht |date=1 November 1992 |title=Project Oberon: The Design of an Operating System and Compiler |publisher=[[Addison-Wesley]] |isbn=978-0201544282}} [http://www.inf.ethz.ch/personal/wirth/books/ProjectOberon.pdf PDF (4'398 KB)] {{Webarchive|url=https://web.archive.org/web/20120710225414/http://www.inf.ethz.ch/personal/wirth/books/ProjectOberon.pdf |date=10 July 2012}}</ref> and [[Oberon-2]].<ref>{{Cite journal |last1=Mössenböck |first1=Hans-Peter |last2=Wirth |first2=Niklaus |author2-link=Niklaus Wirth |date=1991 |title=The Programming Language Oberon-2 |url=http://www.ssw.uni-linz.ac.at/Research/Papers/Oberon2.pdf |journal=Structured Programming |volume=12 |pages=179–195}}</ref> It bears the name of the language [[Pascal (programming 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]] and built-in [[String (computer science)|string]] support. Component Pascal was originally named Oberon/L, and was designed and supported by a small [[ETH Zürich]] spin-off company named Oberon microsystems. They developed an [[integrated development environment]] (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]] (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 Framework 3.0|.NET 3.0]] to access code in [[Extensible Application Markup Language]] (XAML), which was released in 2008. An [[open-source software]] implementation of Component Pascal exists for the [[.NET Framework|.NET]] and [[Java virtual machine]] (JVM) platforms, from the Gardens Point team around John Gough at [[Queensland University of Technology]] 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 ('''''O'''beron '''d'''o'''c'''ument) ''for document files, such as source files, and .osf ''('''O'''beron '''s'''ymbol '''f'''ile'') 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 ('''''O'''beron '''c'''ode '''f'''ile''); 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]] elements in editable forms. This is in the tradition of the Oberon Text format.<ref>{{Cite journal |last1=Mössenböck |first1=H. |last2=Koskimies |first2=K. |date=1996 |title=Active Text for Structuring and Understanding Source Code |url=http://onlinelibrary.wiley.com/doi/10.1002/(SICI)1097-024X(199607)26:7%3C833::AID-SPE34%3E3.0.CO;2-Q/pdf |journal=Software: Practice and Experience |volume=26 |issue=7 |pages=833–850 |doi=10.1002/(SICI)1097-024X(199607)26:7<833::AID-SPE34>3.0.CO;2-Q|url-access=subscription }}</ref> == Syntax == The full syntax for CP, as given by the Language Report, is shown below. In the [[extended Backus–Naur form]], only 34 grammatical productions are needed, one more than for [[Oberon-2]], although it is a more advanced language. <syntaxhighlight lang="ebnf"> Module = MODULE ident ";" [ImportList] DeclSeq [BEGIN StatementSeq] [CLOSE StatementSeq] END ident ".". ImportList = IMPORT [ident ":="] ident {"," [ident ":="] ident} ";". DeclSeq = { CONST {ConstDecl ";" } | TYPE {TypeDecl ";"} | VAR {VarDecl ";"}} { ProcDecl ";" | ForwardDecl ";"}. ConstDecl = IdentDef "=" ConstExpr. TypeDecl = IdentDef "=" Type. VarDecl = IdentList ":" Type. ProcDecl = PROCEDURE [Receiver] IdentDef [FormalPars] MethAttributes [";" DeclSeq [BEGIN StatementSeq] END ident]. MethAttributes = ["," NEW] ["," (ABSTRACT | EMPTY | EXTENSIBLE)]. ForwardDecl = PROCEDURE "^" [Receiver] IdentDef [FormalPars] MethAttributes. FormalPars = "(" [FPSection {";" FPSection}] ")" [":" Type]. FPSection = [VAR | IN | OUT] ident {"," ident} ":" Type. Receiver = "(" [VAR | IN] ident ":" ident ")". Type = Qualident | ARRAY [ConstExpr {"," ConstExpr}] OF Type | [ABSTRACT | EXTENSIBLE | LIMITED] RECORD ["("Qualident")"] FieldList {";" FieldList} END | POINTER TO Type | PROCEDURE [FormalPars]. FieldList = [IdentList ":" Type]. StatementSeq = Statement {";" Statement}. Statement = [ Designator ":=" Expr | Designator ["(" [ExprList] ")"] | IF Expr THEN StatementSeq {ELSIF Expr THEN StatementSeq} [ELSE StatementSeq] END | CASE Expr OF Case {"|" Case} [ELSE StatementSeq] END | WHILE Expr DO StatementSeq END | REPEAT StatementSeq UNTIL Expr | FOR ident ":=" Expr TO Expr [BY ConstExpr] DO StatementSeq END | LOOP StatementSeq END | WITH [ Guard DO StatementSeq ] {"|" [ Guard DO StatementSeq ] } [ELSE StatementSeq] END | EXIT | RETURN [Expr] ]. Case = [CaseLabels {"," CaseLabels} ":" StatementSeq]. CaseLabels = ConstExpr [".." ConstExpr]. Guard = Qualident ":" Qualident. ConstExpr = Expr. Expr = SimpleExpr [Relation SimpleExpr]. SimpleExpr = ["+" | "-"] Term {AddOp Term}. Term = Factor {MulOp Factor}. Factor = Designator | number | character | string | NIL | Set | "(" Expr ")" | " ~ " Factor. Set = "{" [Element {"," Element}] "}". Element = Expr [".." Expr]. Relation = "=" | "#" | "<" | "<=" | ">" | ">=" | IN | IS. AddOp = "+" | "-" | OR. MulOp = "*" | "/" | DIV | MOD | "&". Designator = Qualident {"." ident | "[" ExprList "]" | "^" | "(" Qualident ")" | "(" [ExprList] ")"} [ "$" ]. ExprList = Expr {"," Expr}. IdentList = IdentDef {"," IdentDef}. Qualident = [ident "."] ident. IdentDef = ident ["*" | "-"]. </syntaxhighlight> == References == {{Reflist}} == Further reading == *[https://doi.org/10.3929/ethz-a-000564136 From Modula to Oberon] Wirth (1990) *[http://www.inf.ethz.ch/personal/wirth/Oberon/Oberon.Report.pdf The Programming Language Oberon] Wirth (1990) *[https://doi.org/10.3929/ethz-a-000589808 Differences between Oberon and Oberon-2] Mössenböck and Wirth (1993) *[http://www.ssw.uni-linz.ac.at/Research/Papers/Oberon2.pdf The Programming Language Oberon-2] H. Mössenböck, N. Wirth, Institut für Computersysteme, ETH Zürich ([[ETHZ]]), January 1992. *[https://web.archive.org/web/20110515111149/http://www.oberon.ch/pdf/CP-New.pdf What's New in Component Pascal] (changes from Oberon-2 to CP), Pfister (2001) *[http://www.drdobbs.com/components-and-objects-together/184415685 Components and Objects Together], Clemens Szyperski, Dr.Dobbs, May, 1999 == External links == *{{Official website|blackboxframework.org}} *[https://web.archive.org/web/20191218082105/http://www.oberon.ch/blackbox.html Last available version of former official website] see also [http://blackboxframework.org/index.php?cID=goto-download-page,en-us historical notes on the download page] *[https://github.com/k-john-gough/gpcp Gardens Point Component Pascal] for .NET & JVM *[https://github.com/Oleg-N-Cher/CPFront Component Pascal to C] [[transpiler]] based on Josef Templ's [https://github.com/jtempl/ofront OFront] {{Modula, Oberon}} [[Category:.NET programming languages]] [[Category:Oberon programming language family]] [[Category:Modula programming language family]] [[Category:Component-based software engineering|Pascal]]
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)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Infobox programming language
(
edit
)
Template:Modula, Oberon
(
edit
)
Template:Official website
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Use dmy dates
(
edit
)
Template:Webarchive
(
edit
)