Important: The information in this document is obsolete and should not be used for new development.
GetIndString
TheGetIndString
procedure loads a string from a string list ('STR#'
) resource into memory. It accesses the string by using the resource ID of the string list and the index of the individual string in that list. The list is read from the resource file if necessary.
PROCEDURE GetIndString (VAR theString: Str255; strListID: Integer; index: Integer);
theString
- On output, the Pascal string result.
strListID
- The resource ID of the
'STR#' resource that contains the string list.
index
- The index of the string in the list. This is a value from 1 to the number of strings in the list that is referenced by the
strListID parameter.
DESCRIPTION
GetIndString
returns in the parametertheString
a copy of the string from a string list that has the resource ID provided in thestrListID
parameter. If the resource that you specify cannot be read or the index that you specify is out of range for the string list,GetIndString
setstheString
to an empty string.If necessary,
GetIndString
reads the string list from the resource file by calling the Resource Manager functionGetResource
.GetIndString
accesses the string specified by theindex
parameter and copies it intotheString
. The index can range from 1 to the number of strings in the list.SPECIAL CONSIDERATIONS
GetIndString
may move memory; your application should not call this procedure at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
There is no trap macro for theGetIndString
procedure. Instead, you need to use the_GetResource
trap macro with the resource type ('STR#'
) and string index.