4D v16.3

Get text resource

Home

 
4D v16.3
Get text resource

Get text resource 


 

Get text 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  Text in Contents of the TEXT resource

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

If the resource is not found, empty text 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 text resource can contain up to 32,000 characters.

Example  

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

 ALERT(Get text resource(20800))

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



See also 

_o_SET TEXT RESOURCE
Get indexed string
Get string resource
STRING LIST TO ARRAY

 
PROPERTIES 

Product: 4D
Theme: Resources
Number: 504

The OK variable is changed by the command

 
HISTORY 

Created: 4D v6

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)