Difference between revisions of "Pascal Script"

From Free Pascal wiki
Jump to navigationJump to search
Line 1: Line 1:
 
{{Pascal Script}}
 
{{Pascal Script}}
  
===About===
 
 
Pascal Script is an [[Object Pascal]]/[[Delphi]]/[[Lazarus]]-compatible interpreter with bytecode compiler that delivers a [[PascalScript|scripting]] environment for application programs.
 
Pascal Script is an [[Object Pascal]]/[[Delphi]]/[[Lazarus]]-compatible interpreter with bytecode compiler that delivers a [[PascalScript|scripting]] environment for application programs.
 
It currently works in Windows and Linux on a 32-bit Intel processor.
 
It currently works in Windows and Linux on a 32-bit Intel processor.
 
It was created and is maintained by Carlo Kok and is copyrighted by [http://www.remobjects.com RemObjects software] as freeware with full source available.
 
It was created and is maintained by Carlo Kok and is copyrighted by [http://www.remobjects.com RemObjects software] as freeware with full source available.
 
The fix of few incompatibilities between ROPS (RemObjects Pascal Script) and FreePascal 2.0.1 was made by Bogusław Brandys with a great help of many developers from #fpc and #lazarus-ide IRC channels . Thank You.
 
The fix of few incompatibilities between ROPS (RemObjects Pascal Script) and FreePascal 2.0.1 was made by Bogusław Brandys with a great help of many developers from #fpc and #lazarus-ide IRC channels . Thank You.
 
  
 
Its main caracteristics are :
 
Its main caracteristics are :
 
 
* almost all Object Pascal syntax supported  
 
* almost all Object Pascal syntax supported  
 
* Delphi/Lazarus classes supported (however cannot be declared inside of script)
 
* Delphi/Lazarus classes supported (however cannot be declared inside of script)
 
* can create fully workable GUI forms with components
 
* can create fully workable GUI forms with components
 
* easily import new classes into script engine
 
* easily import new classes into script engine
 
  
 
The download contains the components package for Delphi (various versions) and Lazarus + a few samples for Delphi (which may or may not work under FreePascal+ Lazarus)
 
The download contains the components package for Delphi (various versions) and Lazarus + a few samples for Delphi (which may or may not work under FreePascal+ Lazarus)
Line 21: Line 17:
 
This component is now designed for cross-platform applications, however limited to 32-bit Intel platform only. I'd like to make it work on PowerPC and 64-bit architectures someday. (Note: The current version seems to support 64-bit machines, according to RemObjects.)
 
This component is now designed for cross-platform applications, however limited to 32-bit Intel platform only. I'd like to make it work on PowerPC and 64-bit architectures someday. (Note: The current version seems to support 64-bit machines, according to RemObjects.)
  
===Screenshot===
+
==Screenshot==
 
 
 
Here are some screenshots how it looks under Lazarus:
 
Here are some screenshots how it looks under Lazarus:
  
Line 31: Line 26:
 
</gallery>
 
</gallery>
  
===License===
+
==License==
 
BSD like, see [[Pascal Script/License | full text]].
 
BSD like, see [[Pascal Script/License | full text]].
  
 
+
==Download==
===Download===
 
 
* From RemObjects (FPC + Lazarus is supported)
 
* From RemObjects (FPC + Lazarus is supported)
 
: This is the main page of RemObjects [http://www.remobjects.com/ps.aspx Pascal Script distribution]. There are download links for binary packages.
 
: This is the main page of RemObjects [http://www.remobjects.com/ps.aspx Pascal Script distribution]. There are download links for binary packages.
 
: You can get the source from their SubVersion repository by command
 
: You can get the source from their SubVersion repository by command
 
  svn co -r HEAD http://code.remobjects.com/svn/pascalscript pascalscript
 
  svn co -r HEAD http://code.remobjects.com/svn/pascalscript pascalscript
 
 
* New repository: https://github.com/remobjects/pascalscript git://github.com/remobjects/pascalscript.git
 
* New repository: https://github.com/remobjects/pascalscript git://github.com/remobjects/pascalscript.git
  
===Change Log===
+
==Change Log==
 
* Version 1.0 2005/10/21
 
* Version 1.0 2005/10/21
 
* ("Official" support of FPC, as seen on 2006/07/21)
 
* ("Official" support of FPC, as seen on 2006/07/21)
 
  
 
===Dependencies / System Requirements===
 
===Dependencies / System Requirements===
 
* None
 
* None
 
+
* Status: Beta (ToDo: update info)
Status: Beta (ToDo: update info)
+
* Issues: (ToDo: update info)
 
+
* Needs testing on Windows.
Issues: (ToDo: update info)
+
* Needs testing on Linux.
Needs testing on Windows.
+
* Almost working ;-)
Needs testing on Linux.
 
Almost working ;-)
 
  
 
===Installation===
 
===Installation===
Line 66: Line 56:
 
* Click on Install
 
* Click on Install
  
====Compilation errors====
+
===Compilation errors===
 
When compiling to install the package, the compiler will stumble on two lines in uPSR_forms.pas:
 
When compiling to install the package, the compiler will stumble on two lines in uPSR_forms.pas:
  
Line 77: Line 67:
 
Simply comment out the lines. These methods are not yet implemented in the LCL.
 
Simply comment out the lines. These methods are not yet implemented in the LCL.
  
 
+
==Usage==
===Usage===
 
 
Drop the PascalScript component on a form and a few plugins. (TODO:finish)  
 
Drop the PascalScript component on a form and a few plugins. (TODO:finish)  
  
Line 87: Line 76:
 
See also these [https://github.com/remobjects/pascalscript/wiki articles] from RemObjects.
 
See also these [https://github.com/remobjects/pascalscript/wiki articles] from RemObjects.
  
===Example application===
+
==Example application==
 
 
 
Sample small console mode interpreter application:
 
Sample small console mode interpreter application:
 
[[Pascal Script Examples|Pascal Script Examples (psce)]]
 
[[Pascal Script Examples|Pascal Script Examples (psce)]]
Line 94: Line 82:
 
Sample components Demo with Lazarus GUI:
 
Sample components Demo with Lazarus GUI:
 
[[http://sourceforge.net/projects/maxbox/files/Lazarus/PASCALSCRIPT_LAZARUS.zip/download]]
 
[[http://sourceforge.net/projects/maxbox/files/Lazarus/PASCALSCRIPT_LAZARUS.zip/download]]
 +
 +
== See also ==
 +
* [[Pascal Script tab]]
  
 
[[Category: Pascal Script]]
 
[[Category: Pascal Script]]

Revision as of 11:47, 16 August 2016

Deutsch (de) English (en) español (es) 日本語 (ja) русский (ru)

Pascal Script is an Object Pascal/Delphi/Lazarus-compatible interpreter with bytecode compiler that delivers a scripting environment for application programs. It currently works in Windows and Linux on a 32-bit Intel processor. It was created and is maintained by Carlo Kok and is copyrighted by RemObjects software as freeware with full source available. The fix of few incompatibilities between ROPS (RemObjects Pascal Script) and FreePascal 2.0.1 was made by Bogusław Brandys with a great help of many developers from #fpc and #lazarus-ide IRC channels . Thank You.

Its main caracteristics are :

  • almost all Object Pascal syntax supported
  • Delphi/Lazarus classes supported (however cannot be declared inside of script)
  • can create fully workable GUI forms with components
  • easily import new classes into script engine

The download contains the components package for Delphi (various versions) and Lazarus + a few samples for Delphi (which may or may not work under FreePascal+ Lazarus) It is a work in progress.

This component is now designed for cross-platform applications, however limited to 32-bit Intel platform only. I'd like to make it work on PowerPC and 64-bit architectures someday. (Note: The current version seems to support 64-bit machines, according to RemObjects.)

Screenshot

Here are some screenshots how it looks under Lazarus:

License

BSD like, see full text.

Download

  • From RemObjects (FPC + Lazarus is supported)
This is the main page of RemObjects Pascal Script distribution. There are download links for binary packages.
You can get the source from their SubVersion repository by command
svn co -r HEAD http://code.remobjects.com/svn/pascalscript pascalscript

Change Log

  • Version 1.0 2005/10/21
  • ("Official" support of FPC, as seen on 2006/07/21)

Dependencies / System Requirements

  • None
  • Status: Beta (ToDo: update info)
  • Issues: (ToDo: update info)
  • Needs testing on Windows.
  • Needs testing on Linux.
  • Almost working ;-)

Installation

  • Create the directory lazarus\components\pascalscript
  • Unzip files into the directory
  • Open lazarus
  • Open the package pascalscript.lpk with Component/Open package file (.lpk)
  • Click on Compile
  • Click on Install

Compilation errors

When compiling to install the package, the compiler will stumble on two lines in uPSR_forms.pas:

RegisterMethod(@TAPPLICATION.HELPCOMMAND, 'HELPCOMMAND'); // <-- this one
RegisterMethod(@TAPPLICATION.HELPCONTEXT, 'HELPCONTEXT');
RegisterMethod(@TAPPLICATION.HELPJUMP, 'HELPJUMP');       // <-- and that one

Simply comment out the lines. These methods are not yet implemented in the LCL.

Usage

Drop the PascalScript component on a form and a few plugins. (TODO:finish)

If you get the error "Fatal: Can't find unit uPSCompiler used by ...", open up the pascalscript package, and under the "more" options, select "add to project".

See the example projects.

See also these articles from RemObjects.

Example application

Sample small console mode interpreter application: Pascal Script Examples (psce)

Sample components Demo with Lazarus GUI: [[1]]

See also