Important: The information in this document is obsolete and should not be used for new development.
GetIndString
TheGetIndStringprocedure 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.
DESCRIPTIONGetIndStringreturns in the parametertheStringa copy of the string from a string list that has the resource ID provided in thestrListIDparameter. If the resource that you specify cannot be read or the index that you specify is out of range for the string list,GetIndStringsetstheStringto an empty string.If necessary,
GetIndStringreads the string list from the resource file by calling the Resource Manager functionGetResource.GetIndStringaccesses the string specified by theindexparameter and copies it intotheString. The index can range from 1 to the number of strings in the list.SPECIAL CONSIDERATIONS
GetIndStringmay move memory; your application should not call this procedure at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
There is no trap macro for theGetIndStringprocedure. Instead, you need to use the_GetResourcetrap macro with the resource type ('STR#') and string index.