Clbfile

This keyword declares a character large object (CLOB) variable.

Syntax

Local Clbfile NAME(LENGTH)Local Clbfile NAME(LENGTH)(DIMENSIONS)Variable Clbfile NAME(LENGTH)(DIMENSIONS)Value Clbfile NAME(LENGTH)(DIMENSIONS)Const Clbfile NAME(LENGTH)(DIMENSIONS)

Several variable declarations can be done on the same line, separated by a comma.

Local declarations create the variables in the current local variable class that is not seen by nested or calling sub-programs. The Call / Subprog and func / Funprog insulate the local variables as well as the calls of method by fmet.

Const, Variable, and Value declarations state the arguments sent by a Call, func, or fmet. With these syntaxes, the dimensions and the index ranges can be omitted wherever the parentheses are present. The dimension and index ranges are defined by the calling program.

Example

# Direct declarationsLocal Clbfile MYTEXT(2), MYCOMMENTS(2), REFERENCES(3) : # Local large character variablesLocal Clbfile MYTEXT_ARRAY(2)(1..10) : # An array of 10 large texts# A sub-program sending a text and returning a resultFunprog SEND_TEXT(TEXT)Variable Clbfile TEXT()(,) : # A 2 dimensions matrix of pictures is sent as references...End SEND_STATUS# A sub-program storing textsSubprog STORE_TEXTS(TEXT)Value Clbfile TEXT()(1..3) : # An array of 3 elements is sent (a copy is done when passing the arguments)...End

Comments

The dimension is used to size per default the variable, but if a value exceeding this size is assigned, the execution engine will automatically resize the variable.

The correspondence between the dimension and the default memory size allocated is given by the following table:

DimensionMemory sizeMaximum number of characters stored
01020510
120441022
240922046
381884094
N1024*2^N-4512*2^N-2

There is still a Global declaration variable that exists for variables that have to be seen in the scope of a process execution, but its use is strongly discouraged.

Implicit data type conversion

The Clbfile data type will implicitly convert Date and Clbfile to a Char

Local Clbfile MY_CLOB(1) # Declare ClobLocal Char MY_CHAR(30) #Local Date MY_DATEMY_DATE=[31/12/2099]MY_CHAR="AAAA"MY_CLOB = MY_CHAR-MY_DATE # MY_CLOB = "AAAA 20991231"

Note that Append will not implicitly convert a date to a string.

See also

Global, Local, Variable, Value, Const, Tinyint, Shortint, Date, Integer, Float, Double, Decimal, Char, Blbfile, Uuident, Datetime, Instance.