[next] [prev] [prev-tail] [tail] [up]

#### GetResourceStringName

Declaration:
  Function GetResourceStringName(TableIndex,StringIndex : Longint) : Ansistring;
Description:
  GetResourceStringName returns the name of the resourcestring in table TableIndex with index StringIndex. The name of the string is always the unit name in which the string was declared, followed by a period and the name of the constant, all in lowercase.

  If a unit MyUnit declares a resourcestring MyTitle then the name returned will be myunit.mytitle. A resourcestring in the program file will have the name of the program prepended.

  The name returned by this function is also the name that is stored in the resourcestring file generated by the compiler.

  Strictly speaking, this information isn’t necessary for the functioning of the program, it is provided only as a means to easier translation of strings.

Errors:
  If either TableIndex or StringIndex is zero, an empty string is returned.
See also:
  SetResourceStrings (612), GetResourceStringDefaultValue (603), GetResourceStringHash (604), GetResourceStringName (605), ResourceStringTableCount (611), ResourceStringCount (610)

Listing: refex/ex92.pp

Program Example92;
{ Program to demonstrate the GetResourceStringName function. }
{$Mode Delphi}
ResourceString
First = 'First string';
Second = 'Second String';
Var I,J : Longint;
begin
{ Print names of all resourcestrings }
For I:=0 to ResourceStringTableCount-1 do
For J:=0 to ResourceStringCount(i)-1 do
Writeln (I,',',J,' : ',GetResourceStringName(I,J));
end.

[next] [prev] [prev-tail] [front] [up]