Navigation:  Classes > bCodeblock >

bCodeblock:ArgumentList

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

The argument list as string.

Class

bCodeblock

Type

Access / Assign

Data Types

String

Description

bCodeblock:ArgumentList defines the names of the variables which can be used within the source code. Variable names are separated by commas.

 

After creating a bCodeblock object the access contains the value "Server".

 

Important notes!
The argument list is used in the method bCodeblock:CreateCodeblock() to create a codeblock from the source code.

 

The values of multiple variables are defined with the access bCodeblock:ArgumentValues.

 

If the predefined argument list is changed and a defined data server is to be used in the source code, then the data server must be contained in the argument list.

Samples

In the following sample a new argument list is defined for an object of the class bCodeblock.

 

LOCAL oCodeblock     AS bCodeblock

LOCAL iBase          AS INT

LOCAL iExponent      AS INT

 

// Create codeblock

oCodeblock := bCodeblock{"Pow(Base, Exponent)"}

 

// Define argument list

oCodeblock:ArgumentList := "Base,Exponent"

 

// Define values of argument list

iBase := 2

iExponent := 4

oCodeblock:ArgumentValues := {iBase, iExponent}

 

// Compile source code

IF oCodeblock:Compile()

   // Evaluate source code

   ? oCodeblock:Eval()

ENDIF

 

In the following sample a new argument list is defined, in which the data server is used also.

 

LOCAL oCodeblock     AS bCodeblock

LOCAL fFactor        AS FLOAT

 

// Create codeblock

oCodeblock := bCodeblock{"Server:DISTANCE * Factor"}

 

// Define argument list

oCodeblock:ArgumentList := "Server,Factor"

 

// Define values of argument list

fFactor := 3.5

oCodeblock:ArgumentValues := {SELF:Server, fFactor}

 

// Compile source code

IF oCodeblock:Compile()

   // Evaluate source code

   ? oCodeblock:Eval()

ENDIF

See Also

bCodeblock:ArgumentValues

bCodeblock:Compile()

bCodeblock:CreateCodeblock()

bCodeblock:Expression

bCodeblock:Server

 


Page url: http://www.YOURSERVER.com/index.html?bcodeblock_argumentlist.htm