[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'objpas' (#rtl)

GetResourceStringDefaultValue

Return default (original) value of resourcestring

Declaration

Source position: objpas.pp line 104

function GetResourceStringDefaultValue(

  TableIndex: LongInt;

  StringIndex: LongInt

):AnsiString;

Description

GetResourceStringDefaultValue returns the default value of the resourcestring in table TableIndex with index StringIndex.

The default value is the value of the string that appears in the source code of the programmer, and is compiled into the program.

Errors

If either TableIndex or StringIndex are out of range, then a empty string is returned.

See also

SetResourceStrings

  

Set values of all resource strings.

GetResourceStringCurrentValue

  

Return current value of resourcestring

GetResourceStringHash

  

Return hash value of resource string

GetResourceStringName

  

Return name of resource string.

ResourceStringTableCount

  

Return number of resource string tables

ResourceStringCount

  

Return number of resource strins in table

Example

Program Example91;

{ Program to demonstrate the GetResourceStringDefaultValue function. }
{$Mode Delphi}

ResourceString

  First  = 'First string';
  Second = 'Second String';

Var I,J : Longint;

begin
  { Print default values of all resourcestrings }
  For I:=0 to ResourceStringTableCount-1 do
    For J:=0 to ResourceStringCount(i)-1 do
      Writeln (I,',',J,' : ',GetResourceStringDefaultValue(I,J));
end.
The latest version of this document can be found at lazarus-ccr.sourceforge.net.