Innerfuse Pascal Script
Back to Index.
Unit ifs_var.pas
Types:
PIFVariant
PTypeRec
PIFSClassType
PCreatedClass
PProcedure
PProcedureManager
PVariableManager
PIFSPasScriptError
PTypeManager
PIFSProcType
PIFSRecordType
PPropertyDef
PRegisteredProc
TCSV_UByte = Byte;
TCSV_SByte = ShortInt;
TCSV_Char = Char;
TCSV_UInt16 = Word;
TCSV_SInt16 = SmallInt;
TCSV_UInt32 = Cardinal;
TCSV_SInt32 = Longint;
Constants: CSV_NONE = 0; { Void/ERROR }
CSV_UByte = 1; { Byte }
CSV_SByte = 2; { ShortInt }
CSV_UInt16 = 3; { Word }
CSV_SInt16 = 4; { Integer (Delphi : SmallInt) }
CSV_UInt32 = 5; { Longint (Delphi : Cardinal) }
CSV_SInt32 = 6; { Longint }
CSV_Char = 7; { Char }
CSV_String = 8; { String }
CSV_Real = 9; { Real }
CSV_Single = 10; { Single }
CSV_Double = 11; { Double }
CSV_Extended = 12; { Extended }
CSV_Comp = 13; { Comp }
CSV_Bool = 14; { Boolean }
CSV_Var = 15; { Variable in function call }
CSV_Array = 16; { Array }
CSV_Record = 17; { Record }
CSV_Internal = 19; { Internal }
CSV_Class = 18; { Class }
CSV_ClassRef = 20; { Class of Class }
CSV_Property = 21; { Property }
CSV_TypeCopy = 22;
CSV_ProcVariable = 23;
CSV_Special = 24;
CSV_ExternalObject = 25;
CSV_ExternalObjectProperty = 26;
CSV_Variant = 27;
Functions:
function CreateCajVariant(PType: PIfVariant): PIfVariant;
Create a variant.
procedure DestroyCajVariant(p: PIfVariant);
Destroy a variant.
function ChangeType(p: PIfVariant; newtype: PIfVariant): PIfVariant;
Change the type of a variant. (returns p)
function DoMinus(p: PIfVariant): Boolean;
Do a *-1 on P.
function DoNot(p: PIfVariant): Boolean;
Do a NOT on P
procedure SetInteger(p: PIfVariant; I: LongInt);
Set the value of P to I.
procedure SetReal(p: PIfVariant; i: Extended);
Set the value of P to I.
procedure SetString(p: PIfVariant; const I: string);
Set the value of P to I.
procedure SetBoolean(p: PIfVariant; i: Boolean);
Set the value of P to I.
function IsStringType(v: PIfVariant): Boolean;
Returns if v is of string type (char or string).
function IsIntRealType(v: PIfVariant): Boolean;
Returns if v is of real or integer type.
function IsIntegerType(v: PIfVariant): Boolean;
Returns if v is of integer type.
function IsBooleanType(v: PIfVariant): Boolean;
Returns if v is of boolean type.
function IsRealType(v: PIfVariant): Boolean;
Returns if v is of real type.
function GetString(v: PIfVariant): string;
Returns the value of V as a string.
function GetReal(v: PIfVariant): Extended;
Returns the value of V as a real.
function GetInteger(v: PIfVariant): LongInt;
Returns the value of V as an integer.
function GetBoolean(v: PIfVariant): Boolean;
Returns the value of V as a boolean.
function ErrorToString(e: TIfPasScriptError; const ErrorString: string): string;
Convert an error code + error param to a string.
function GetVarLink(p: PIfVariant): PIfVariant;
Resolves a variable link.
function GetTypeLink(p: PIfVariant): PIfVariant;
Resolves a type link.
Copyright (c) 2001 by Carlo Kok
last update: 24-11-01