4D v14.3

Get string resource

Home

 
4D v14.3
Get string resource

Get string resource 


 

Get string resource ( resID {; resFile} ) -> Function result 
Parameter Type   Description
resID  Longint in Resource ID number
resFile  DocRef in Resource file reference number, or all open resource files, if omitted
Function result  String in Contents of the STR resource

The Get string resource command returns the string stored in the string (“STR ”) resource whose ID is passed in resID.

If the resource is not found, an empty string is returned and the OK variable is set to 0 (zero).

If you pass a valid resource file reference number in resFile, the resource is searched for in that file only. If you do not pass resFile, the first occurrence of the resource found in the resource files chain is returned.

Note: A string resource can contain up to 255 characters.

Example  

The following example displays the contents of the string resource ID=20911, which must be located in at least one of the currently open resource files:

 ALERT(Get string resource(20911))

If the resource is found, OK is set to 1. Otherwise, it is set to 0 (zero).

 
PROPERTIES 

Product: 4D
Theme: Resources
Number: 506

The OK variable is changed by the command

 
HISTORY 

Created: 4D v6

 
SEE ALSO 

Get indexed string
Get text resource
SET STRING RESOURCE
STRING LIST TO ARRAY

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)