delphi脚本解释器比较

        Delphi由于RTTI功能有限因此,如果需要执一些动态脚本函数,比较麻烦(尽管D2009提供了一些反射功能)。由此催生了不少的第三方脚本解释器VCL控件。
        比较出名的脚本解释器为TMS Scripter、FastScript(FastReport用到)、Remobjects PascalScript、PaxScripter。
       下面比较上述脚本解释器的一些优点和缺点。
        TMS Scripter:支持Pascal和VBScript两种语法。优点是文档齐全、例子齐全,脚本可直接支持DLL,官方还提供了丰富的IDE Debug工具、单元导出函数工具等,缺点是编译运行较慢。for 空循环1000万次,需要10秒钟以上。TMS Scripter是商业共享软件。
        FastScript:用过FastReport报表的同学都知道FastReport速度非常快。for 空循环1000万次,只耗费4至5秒左右。其中FastScript在报表可做版本排版微调处理、函数计算等。其优点是速度很快、很容易写出脚本单元的RTTI组件、支持pascal、VBScript、JS、C 四种语法,缺点是文档和例子比较少,默认的脚本不能直接支持DLL。FS也是商业共享软件。
      Remobjects PascalScript,顾名思义,只支持pascal语法,Remobjects 初衷是在DA里提供自定义的脚本处理。优点是免费软件,脚本直接支持DLL 。缺点是文档不多。速度比TMS Scripter 稍快。
     PaxScripter是综合性能最好的脚本解释器。其优点是速度最快,for 空循环1000万次,只耗费1至2秒左右。文档和例子比较齐全,有导出函数工具。脚本里直接支持DLL。支持pascal、VBScript、JS、C 四种语法。缺点是,作者05年至今尚未更新版本。作者兴趣已经不在脚本解释器,专门研究.Net和pascal编译器。因此,PaxScripter至今尚不能支持D2009。PaxScripter是商业软件。如果只想支持pascal语法即可,可用作者的pascal编译器代替PaxScripter,速度更是比PaxScripter还要快。

        
        



        







        
          
            
            评论这张
          
        


          
            
               delphi脚本解释器比较 - yyimen - yyimen的博客
            
            转发至微博
          
        
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
超强大、好用的Pascal语言解释器:RemObjects Pascal Script,支持以下特性: Pascal Script is a widely-used set of components for Delphi that makes it easy to add Pascal-based scripting support to your applications, so that they can extend or control your application with custom scripts. Get Pascal Script Free Now Start using Pascal Script now and download your free copy, including full source code. Pascal Script for Delphi Pascal Script is a free scripting engine that allows you to use most of the Object Pascal language within your Delphi or Free Pascal projects at runtime. Written completely in Delphi, it is composed of a set of units that can be compiled into your executable, eliminating the need to distribute any external files. Pascal Script started out as a need for a good working script, when there were none available at the time. Why use a scripting engine? A scripting engine allows an end user to customize an application to his or her needs without having to recompile it. In addition, you can update your applications by just sending a new script file that could even be compiled to byte code, which cannot easily be transformed back to source code. Pascal Script includes the following features: Variables, Constants Standard language constructs: Begin/End If/Then/Else For/To/Downto/Do Case x Of Repeat/Until While Uses Exit Continue Break Functions inside the script Calling any external DLL function (no special function headers required) Calling registered external methods All common types like Byte, Shortint, Char, Word, SmallInt, Cardinal, Longint, Integer, String, Real, Double, Single, Extended, Boolean, Array, Record, Enumerations, Variants Allows the importing and use of classes, with events, properties, methods and constructors Allows the importing and use of interface and their members Allows IDispatch dynamic method invocation through Variant Assignment of script functions to Delphi events Uses byte code as an intermediate format and allows storing and reloading compiled scripts Easy to use component version Support for include files Support for compiler defines Capability to call RemObjects SDK Services from within scripts Pascal Script includes a tool to create headers for importing classes and interfaces

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值