Functions (Pascal Script)

From RemObjects Software

Jump to: navigation, search

This is a Pascal Script Architecture entry
Feel free to add your notes to this topic below.


Function
Description
AddImportedClassVariable function AddImportedClassVariable(Sender: TPSPascalCompiler; const VarName: string; const VarType: string): Boolean;

Add an imported class variable, this should be assigned at runtime before executing

source file: uPSCompiler

DisposePPSVariantIFC procedure DisposePPSVariantIFC(aVar: PPSVariantIFC);

Dispose a PPSVariantIFC

source file: uPSRuntime

DisposePPSVariantIFCList procedure DisposePPSVariantIFCList(list: TPSList);

Dispose a list of PPSVariantIFC

source file: uPSRuntime

DllExternalProc function DllExternalProc(Sender: v; Decl: TPSParametersDecl; const Name: string; const FExternal: string): TPSRegProc;

Assign this to the TPSCompiler.OnExternal event

source file: uPSC_dll

ExportCheck function ExportCheck(Sender: TPSPascalCompiler; Proc: TPSInternalProcedure; Types: array of TPSBaseType; Modes: array of TPSParameterMode): Boolean;

Check the proc definition. Types[0] is the result type (or 0). Modes specify the parameter passing mode (in, var). High(Types) should always be 1 more than High(Modes).

source file: uPSCompiler

FastLowerCase function FastLowerCase(const s: String): string;

Fast lowercase.

source file: uPSUtils

FastUpperCase function FastUpperCase(const s: String): string;

Fast uppercase.

source file: uPSUtils

FloatToStr function FloatToStr(E: Extended): string;

Convert a float to a string.

source file: uPSUtils

Fw function Fw(const S: string): string;

Return the first word of a string.

source file: uPSUtils

GetMethodInfoRec function GetMethodInfoRec(SE: TPSExec; ProcNo: Cardinal): Pointer;

Internal Function: Returns the Data pointer of a TMethod for a ProcNo.

source file: uPSRuntime

GRFW function GRFW(var s: string): string;

Get the first word and remove it

source file: uPSUtils

IFPS3DataToText function IFPS3DataToText(const Input: string; var Output: string): Boolean;

Convert compiled code to decompiled asm-like code. Input: the output of the GetOutput() function. Output: Asm code.

source file: uPSDisassembly

IntToStr function IntToStr(I: LongInt): string;

Integer to string conversion.

source file: uPSUtils

MakeHash function MakeHash(const s: string): Longint;

Make a hash of a string

source file: uPSUtils

MkMethod function MkMethod(FSE: TPSExec; No: Cardinal): TMethod;

Make a method pointer of a script engine + function number, not that this doesn't work unless the proc was exported with ExportMode etExportDecl.

source file: uPSRuntime

MyAllMethodsHandler procedure MyAllMethodsHandler;

Internal function: Script Event HandlerSupported Parameter Types: u8, s8, u16, s16, u32, s32, s64, single, double, extended, class, variant, string, charSupported Result Types: u8, s8, u16, s16, u32, s32, string, variant.

source file: uPSRuntime

NewPPSVariantIFC function NewPPSVariantIFC(avar: PPSVariant; varparam: boolean): PPSVariantIFC;

Create a new PPSVariantIFC

source file: uPSRuntime

NewTPSVariantIFC function NewTPSVariantIFC(avar: PPSVariant; varparam: boolean): TPSVariantIFC;

Create a new TPSVariantIFC.

source file: uPSRuntime

ParseMethod function ParseMethod(Owner: TPSPascalCompiler; const FClassName: string; Decl: string; var OrgName: string; DestDecl: TPSParametersDecl; var Func: TPMFuncType);

Parse a method header

source file: uPSCompiler

PIFVariantToVariant function PIFVariantToVariant(Src: PIFVariant; var Dest: Variant): Boolean;

Convert a PIFvariant to a real variant.

source file: uPSRuntime

ProcessDllImport function ProcessDllImport(Caller: TPSExec; P: TPSExternalProcRec): Boolean;

Process a dll import (no need to call this function).

source file: uPSR_dll

PS_mi2s function PS_mi2s(i: Cardinal): string;

This function returns.

source file: uPSCompiler

PSErrorToString function PSErrorToString(x: TPSError; const Param: string): string;

Convert an error to a string.

source file: uPSRuntime

RegisterClassLibraryRuntime procedure RegisterClassLibraryRuntime(SE: TPSExec; Importer: TPSRuntimeClassImporter);

Register the classes at runtime.

source file: uPSRuntime

RegisterDateTimeLibrary_C procedure RegisterDateTimeLibrary_C(S: TPSPascalCompiler);

Register the compiler pare of the Datetime libraryTDateTime = double; function EncodeDate(Year, Month, Day: Word): TDateTime; function EncodeTime(Hour, Min, Sec, MSec: Word): TDateTime; function TryEncodeDate(Year, Month, Day: Word; out Date: TDateTime): Boolean; function TryEncodeTime(Hour, Min, Sec, MSec: Word; out Time: TDateTime): Boolean; procedure DecodeDate(const DateTime: TDateTime; var Year, Month, Day: Word); procedure DecodeTime(const DateTime: TDateTime; var Hour, Min, Sec, MSec: Word); function DayOfWeek(const DateTime: TDateTime): Word; function Date: TDateTime; function Time: TDateTime; function Now: TDateTime; function DateTimeToUnix(D: TDateTime): Int64; function UnixToDateTime(U: Int64): TDateTime; function DateToStr(D: TDateTime): string; function StrToDate(const s: string): TDateTime; function FormatDateTime(const fmt: string; D: TDateTime): string;

source file: uPSC_dateutils

RegisterDateTimeLibrary_R procedure RegisterDateTimeLibrary_R(S: TPSExec);

Register the runtime part of the datetime library.

source file: uPSR_dateutils

RegisterDLLRuntime procedure RegisterDLLRuntime(Caller: TPSExec);

Register the dll runtime library

source file: uPSR_dll

RIRegister_ComObj procedure RIRegister_ComObj(cl: TPSExec);

Will register:

  • function CreateOleObject(const ClassName: string): IDispatch;
  • function GetActiveOleObject(const ClassName: string): IDispatch;



source file: uPSR_comobj

RIRegister_ExtCtrls procedure RIRegister_ExtCtrls(cl: TPSRuntimeClassImporter);

Will register files from: ExtCtrls. Requires: STD, classes, controls, graphics {$IFNDEF PS_MINIVCL}, stdctrls {$ENDIF}.

source file: uPSR_extctrls

RIRegisterTControl procedure RIRegisterTControl(Cl: TPSRuntimeClassImporter);

Will register files from: System Controls. Register the STD, Classes and Graphics libraries first

source file: uPSR_controls

RIRegisterTCUSTOMGROUPBOX procedure RIRegisterTCUSTOMGROUPBOX(Cl: TPSRuntimeClassImporter);

Will register files from: stdctrls. Requires: STD, classes, controls and graphics

source file: uPSR_stdctrls

RIRegisterTGRAPHICSOBJECT procedure RIRegisterTGRAPHICSOBJECT(Cl: TPSRuntimeClassImporter);

Will register files from: Graphics. Register the STD library first.

source file: uPSR_graphics

RIRegisterTObject procedure RIRegisterTObject(CL: TPSRuntimeClassImporter);

Will register files from: System Classes (No Streams).

source file: uPSR_std

RIRegisterTROBINMESSAGE procedure RIRegisterTROBINMESSAGE(Cl: TIFPSRuntimeClassImporter);



source file: uROPSImports

RIRegisterTSPEEDBUTTON procedure RIRegisterTSPEEDBUTTON(Cl: TPSRuntimeClassImporter);

Will register files from: Buttons. Requires STD, classes, controls and graphics and StdCtrls.

source file: uPSR_buttons

RIRegisterTStrings procedure RIRegisterTStrings(cl: TPSRuntimeClassImporter; Streams: Boolean);

Will register files from: Classes (exception TPersistent and TComponent). Register STD first.

source file: uPSR_classes

SetVarExportName procedure SetVarExportName(P: TPSVar; const ExpName: string);

Set the export name of a global variable.

source file: uPSCompiler

SetVariantToClass procedure SetVariantToClass(V: PIFVariant; Cl: TObject);

Set a runtime variant.

source file: uPSRuntime

SIRegister_Buttons_TypesAndConsts procedure SIRegister_Buttons_TypesAndConsts(Cl: TPSPascalCompiler);

Will register files from: Buttons. Requires STD, classes, controls and graphics and StdCtrls. Will register files from: Buttons. Requires STD, classes, controls and graphics and StdCtrls

source file: uPSC_buttons

SIRegister_Classes_TypesAndConsts procedure SIRegister_Classes_TypesAndConsts(Cl: TPSPascalCompiler);

Will register files from: Classes (exception TPersistent and TComponent). Register STD first.

source file: uPSC_classes

SIRegister_ComObj procedure SIRegister_ComObj(cl: [[TPSPascalCompiler Class|TPSPascalCompiler]]);

Will register - function CreateOleObject(const ClassName: string): IDispatch; function GetActiveOleObject(const ClassName: string): IDispatch;

source file: uPSC_comobj

SIRegister_Controls_TypesAndConsts procedure SIRegister_Controls_TypesAndConsts(Cl: TPSPascalCompiler);

Will register files from: Controls. Register the STD, Classes (at least the types&consts) and Graphics libraries first

source file: uPSC_controls

SIRegister_Graphics_TypesAndConsts procedure SIRegister_Graphics_TypesAndConsts(Cl: TPSPascalCompiler);

Will register files from: Graphics. Register the STD library first.

source file: uPSC_graphics

SIRegister_Std_TypesAndConsts procedure SIRegister_Std_TypesAndConsts(Cl: TPSPascalCompiler);

Will register files from: System Classes (Only TComponent and TPersistent)

source file: uPSC_std

SIRegister_StdCtrls_TypesAndConsts procedure SIRegister_StdCtrls_TypesAndConsts(cl: TPSPascalCompiler);

Will register files from: stdctrls. Requires: STD, classes, controls and graphics

source file: uPSC_stdctrls

SIRegisterTCustomControl procedure SIRegisterTCustomControl(cl: TPSPascalCompiler);

Requires TWinControl.

source file: uPSC_controls

SIRegisterTGraphicControl procedure SIRegisterTGraphicControl(cl: TPSPascalCompiler);

Requires TControl.

source file: uPSC_controls

SIRegisterTROBINMESSAGE procedure SIRegisterTROBINMESSAGE(CL: TIFPSPascalCompiler);



source file: uROPSImports

SIRegisterTWinControl procedure SIRegisterTWinControl(Cl: TPSPascalCompiler);

Requires TControl.

source file: uPSC_controls

StrToInt function StrToInt(const S: string): LongInt;

String to integer.

source file: uPSUtils

StrToIntDef function StrToIntDef(const S: string; Def: LongInt): LongInt;

String to integer.

source file: uPSUtils


Product: RemObjects Pascal Script
Current version: Pascal Script 3.0

GlossaryFeaturesHow ToComponentsToolsSamplesArticlesArchitectureIssues

Personal tools