11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CAT<br />

Syntax<br />

expr1 CAT expr2<br />

Synonym<br />

:<br />

Description<br />

The <strong>UniBasic</strong> CAT arithmetic operator concatenates expr1 to expr2.<br />

Examples<br />

In the following example, the program segment concatenates A to B, and then prints<br />

123456:<br />

A = "123"<br />

B = "456"<br />

C = A CAT B<br />

PRINT C<br />

The following program segment compiles and runs only with null value handling on.<br />

The program concatenates two strings, one ending with the null value, and another<br />

beginning with ‘123.’ This produces the string @AM@NULL123@AM456. The called<br />

subroutine, print.setup, converts UniData delimiters and the null value to printable<br />

characters. (This subroutine is printed in the entry for “CHANGE” on page 133.)<br />

PRT.STG = ''<br />

Z=123:@AM:456<br />

Y=@AM:@NULL<br />

STG = Y CAT Z<br />

CALL print.setup(STG,PRT.STG)<br />

PRINT PRT.STG<br />

CAT 1-128

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!