CodeText

(Engine-Level Function)

Description: Returns information (usually the source code text), matching the given code value.
Warning: This function should be used only by advanced programmers.
Returns: Varies (see 2nd parameter).
Usage: Script Only.
Function Groups: Advanced Module
Related to:

SetCodeText

Format: CodeText(CodeVal[, Type])
Parameters:  
CodeVal
Required. Any code value giving the statement or function within a statement whose text to be read.
Type
Optional numeric expression. Controls what will be returned by the function according to the following table:

Type

Description

0

default. Return the text for the expression.

1

Return the offset in the file for the start of the expression.

2

Return the size (number of bytes) of the expression.

Comments: Returns the source code text, offset or size for the provided code value. Typically followed by a SetCodeText call, which would then update the source code with new text.