Pascal Script

Last updated
Pascal Script
Pascal Script 3 Lazarus IDE.png
Paradigm Procedural, object-oriented, scripting
Developer Carlo Kok, Innerfuse, RemObjects, Lazarus and Free Pascal teams
First appeared2000;22 years ago (2000)
Stable release
3.0
Typing discipline Strong
OS Linux, macOS, Windows
License Custom open-source license
Filename extensions .pas
Influenced by
Pascal, Object Pascal

Pascal Script is a scripting language based on the programming language Pascal that facilitates automated runtime control over scriptable applications and server software. It is implemented by a free scripting engine that includes a compiler and an interpreter for byte code.

Contents

Pascal Script supports the majority of Object Pascal constructs, making it partly compatible to Delphi, Free Pascal and GNU Pascal.

Initially developed by Carlo Kok as CajScript and renamed to Innerfuse Pascal Script with version 2.23, the software was taken over by RemObjects, renamed again to RemObjects Pascal Script and offered as open source software for the Delphi IDE. Beginning with version 2.07 CajScript has been ported to Free Pascal. Since 2017 Pascal Script is included as a standard component in the Lazarus IDE.

Software using Pascal Script

Pascal Script can be used by installer scripts for Inno Setup, an open source setup engine. Using Pascal Script may provide additional flexibility during installation and uninstallation, e. g. by adding new wizard pages, calling DLLs and providing custom behaviour and install conditions. [1]

Pascal Script is also used for server-side scripting in Pascal Server Pages and maXbox, a scripter studio with an inbuild Delphi engine.

ReNamer, a batch-oriented automated file renaming tool for Windows, can be expanded by Macros written in Pascal Script. [2]

With the release of version 1.2, the Lazarus IDE began to include the Pascal Script engine, which is now available in form of several components. Additionally, some of Lazarus' standard packages including SynEdit and TAChart support Pascal Script, and the IDE may be extended by using macros written in Pascal Script.

Increasingly reported applications of Pascal Script in Science and Technology include SCADA, [3] robotics [4] and education. [5]

History

Pascal Script started out in 2000 with CajScript 1.0, which was soon superseded by CajScript 2.0 (later called Innerfuse Pascal Script 2.0).

Version 2.0 interpreted scripts while it ran them, which had the disadvantage that every piece of code had to be reparsed every time the script engine went over it.

With Pascal Script 3.0, this was changed to a new model, where the compiler and runtime were completely separated from each other and used a custom byte code format to represent the compiled script. This compiled script only contained the bare minimum that was required to execute the code.

Later, when Carlo Kok joined RemObjects, it was renamed RemObjects Pascal Script and is now being maintained by RemObjects Software. [6] A fork of Pascal Script is maintained in the sources of the Lazarus IDE. The Lazarus and Free Pascal teams ported PascalScript from Intel processors to additional architectures including PowerPC and ARM. [7]

Related Research Articles

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 and a debugger. Some IDEs, such as NetBeans and Eclipse, contain the necessary compiler, interpreter, or both; others, such as SharpDevelop and Lazarus, do not.

Pascal (programming language) Programming language

Pascal is an imperative and procedural programming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming and data structuring. It is named in honour of the French mathematician, philosopher and physicist Blaise Pascal.

Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the Pascal programming language running on CP/M, CP/M-86, and DOS. It was originally developed by Anders Hejlsberg at Borland, and was notable for its extremely fast compiling times. Turbo Pascal, and the later but similar Turbo C, made Borland a leader in PC-based development.

C++Builder is a rapid application development (RAD) environment, originally developed by Borland and as of 2009 owned by Embarcadero Technologies, for writing programs in the C++ programming language currently targeting Windows, iOS and for several releases, macOS and Android C++Builder combines the Visual Component Library and IDE written in Object Pascal with multiple C++ compilers. Most components developed in Delphi can be used in C++Builder with no or little modification, although the reverse is not true, but this constraint is valid only for source code. Binary code generated by Delphi can easily be linked to binary code generated by C++Builder and vice versa to generate an executable written in both Object Pascal and C++. With this approach, C++ can be called from Object Pascal and vice versa. Since both Delphi and C++ use the same back end linker, the debugger can single step from Delphi code into C++ transparently.

Delphi (software) General-purpose programming language and a software product

Delphi is a general-purpose programming language and a software product that uses the Delphi dialect of the Object Pascal programming language and provides an integrated development environment (IDE) for rapid application development of desktop, mobile, web, and console software, currently developed and maintained by Embarcadero Technologies.

Metaprogramming is a programming technique in which computer programs have the ability to treat other programs as their data. It means that a program can be designed to read, generate, analyze or transform other programs, and even modify itself while running. In some cases, this allows programmers to minimize the number of lines of code to express a solution, in turn reducing development time. It also allows programs creater flexibility to efficiently handle new situations without recompilation.

Object Pascal is an extension to the programming language Pascal that provides object-oriented programming (OOP) features such as classes and methods.

Free Pascal Free compiler and IDE for Pascal and ObjectPascal

Free Pascal Compiler (FPC) is a compiler for the closely related programming-language dialects Pascal and Object Pascal. It is free software released under the GNU General Public License, with exception clauses that allow static linking against its runtime libraries and packages for any purpose in combination with any other software license.

Borland Kylix is a compiler and integrated development environment (IDE) formerly sold by Borland, but later discontinued. It is a Linux software development environment based on Borland Delphi and Borland C++ Builder, which runs under Microsoft Windows. Continuing Delphi's classical Greek theme, Kylix is the name for an ancient Greek drinking cup. The closest supported equivalent to Kylix is the free Lazarus IDE package, designed to be code-compatible with Delphi. As of 2010 the project has been resurrected in the form of Delphi cross compiler for Mac and Linux, as shown in the Embarcadero's Delphi and C++ Builder roadmap. As of September 2011 with Kylix discontinued the framework for cross-platform development by Embarcadero is FireMonkey.

Lazarus (software) Free cross-platform integrated development environment for Free Pascal

Lazarus is a free cross-platform visual integrated development environment (IDE) for rapid application development (RAD) using the Free Pascal compiler. Its goal is to provide an easy-to-use development environment for programmers developing with the Object Pascal language, which is as close as possible to Delphi.

Active Scripting is the technology used in Windows to implement component-based scripting support. It is based on OLE Automation and allows installation of additional scripting engines in the form of COM modules.

Scintilla (software) Free and open text editor component

Scintilla is a free, open source library that provides a text editing component function, with an emphasis on advanced features for source code editing.

Inno Setup

Inno Setup is a free software script-driven installation system created in Delphi by Jordan Russell. The first version was released in 1997.

The following outline is provided as an overview of and topical guide to computer programming:

Morfik Technology Pty Ltd. is an Australian software company that was acquired by Altium in 2010.

RemObjects Software is an American software company founded in 2002 by Alessandro Federici and Marc Hoffman. It develops and offers tools and libraries for software developers on a variety of development platforms, including Embarcadero Delphi, Microsoft .NET, Mono, and Apple's Xcode.

Smart Pascal is a dialect of the Object Pascal computer language that is derived from Delphi Web Script, but is enhanced and adapted for Smart Mobile Studio, a commercial development suite that generates JavaScript rather than machine code.

This page details the history of the programming language and software product Delphi.

References

  1. Murphy, Craig (2004). "Inno Setup Revisited" (PDF). The Developers Magazine: 15–28. Retrieved 25 May 2019.
  2. "ReNamer:Pascal Script - den4b Wiki". www.den4b.com. Retrieved 7 July 2019.
  3. Tynchenko, V S; Kukartsev, V V; Tynchenko, V V; Chzhan, E A; Korpacheva, L N (15 November 2018). "Automation of monitoring and management of conveyor shop oil-pumping station of coal industry enterprise". IOP Conference Series: Earth and Environmental Science. 194 (2): 022044. Bibcode:2018E&ES..194b2044T. doi: 10.1088/1755-1315/194/2/022044 .
  4. Lima, Jose; Costa, Paulo; Brito, Thadeu; Piardi, Luis (2019). "Hardware-in-the-loop simulation approach for the Robot at Factory Lite competition proposal". 2019 IEEE International Conference on Autonomous Robot Systems and Competitions (ICARSC). pp. 1–6. doi:10.1109/ICARSC.2019.8733649. hdl:10198/20934. ISBN   978-1-7281-3558-8. S2CID   183602145.
  5. Romeo, A. "The Role of Simulation Tools in the Teaching of Robot Control and Programming". CiteSeerX   10.1.1.529.8255 .{{cite journal}}: Cite journal requires |journal= (help)
  6. "Pascal Script | RemObjects Software". RemObjects Software. Retrieved 18 January 2014.
  7. "Pascal Script - Lazarus wiki". wiki.freepascal.org. Retrieved 25 May 2019.