TROMacroVar

Overview

The TROMacroVar class holds the name and value of the macro variable.

The TROMacroVar class is used in the TROMacroParser.

The following code gives an example of the usage:

  • Delphi:
//MacroParser:  TROMacroParser;
//lvar: TROMacroVar;   
 lvar := MacroParser.AddVariable('MyVar');
 lvar.Value := 10; 
  • SQL:
 select * from table1 where field1 > {MyVar}

Location


Properties


Name

Name of the variable.

property Name: string read

NameHash

Hash of the Name.

property NameHash: Integer read

Value

Value of the variable.

property Value: string read write

Instance Methods


constructor Create

Creates a new instance.

constructor Create(const aName: string)

Parameters:

  • aName: Name of macro.