Please enable JavaScript to view this site.

ESL Documentation

ESLLIB Function

Get an external string by its numeric identifier.

EslXstr(STRING_ID, NOT_FOUND_MESSAGE)

STRING_ID

The number that identifies the string in the resource file, between 1 and 65535.

NOT_FOUND_MESSAGE

An error message string. If the external string is not found or cannot be loaded for some reason, then this message, with the id number appended to it, is returned. If this string is empty and the external string is not loaded, then an empty string is returned, which makes it easy to test for an error.

Description

Load an external string by numeric identifier. In most cases this is not needed, as ESL manages the loading of external strings and does not require knowledge of the identifiers. This function allows additional string data to be stored in the string DLL, beyond what is in the ESL source code.

This function first tries to load the string from the secondary string DLL, if there is one. If it is not found, then it is loaded from the primary string DLL. If the external string is not loaded, the NOT_FOUND_MESSAGE, with the ID number appended to it, is returned. If that message is empty, an empty string is returned.

This function loads an external string each time it is called. If the same external string is needed frequently, we suggest that you buffer it in a variable after it is loaded.

Example

change object text to (EslXstr(

AlternatePromptID, "External string error"))

for ID = FirstDeptID to 65535 loop

copy (EslXstr(ID, "")) to DeptName_SV

if (DeptName_SV != "") then

add to Dept_LB insert DeptName_SV

else leave loop # Not found, used to indicate end of list

end if

end loop

See Also

EslXstrFromDLL( ) ESLLIB Function

EslXstrSetPrimaryDLL( ) ESLLIB Subroutine

EslXstrSetSecondaryDLL( ) ESLLIB Subroutine