compose, compose line
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.
Indirect parameter passing is enabled
Min 0
No. | Type | Description |
---|---|---|
1, ... input |
all types | Contents Contents to be output |
Type | Description |
---|---|
string | Composed string Same contents as output to the console |
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 ..." );
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 ...