compose ...

Prev Next

Function Names

compose, compose line

Description

The functions compose and compose line work similarly like print() and print line(). The only difference is that only the composed string will be returned as return value, but nothing is output onto the console.

Call as: procedure or function

Restrictions

Indirect parameter passing is enabled

Parameter count

Min 0

Parameters

No.TypeDescription
1, ...
input
all types Contents

Contents to be output

Return value

TypeDescription
string Composed string

Same contents as output to the console

Examples

    c[] = 3+5*2;

    a[] = compose line( "Calculation: ", c[], " compared with 13 gives ", c[]==13, "." );
    echo("The composed string using 'compose line' is", new line, a[], "... Done ..." );

    a[] = compose ( "Calculation: ", c[], " compared with 13 gives ", c[]==13, "." );
    echo("The composed string using 'compose' is", new line, a[], "... Done ..." );

Output

The composed string using 'compose line' is
Calculation: 13 compared with 13 gives true.
... Done ...
The composed string using 'compose' is
Calculation: 13 compared with 13 gives true.... Done ...
Try it yourself: Open LIB_Function_compose.b4p in B4P_Examples.zip. Decompress before use.

See also

compose
compose line