The writet statement writes a tape record to the attached magnetic media from the specified variable.
writet exp[then statement.block{[else|onerr.clause] statement.block}]
exp | If the size of the expression is less than the attached tape block size, it is padded to fill the block size. If it is greater than the block size, it is truncated. |
onerr.clause | An optional onerr.clause can be specified, which consists of the clause onerr followed by a statement block. The else or onerr clause is executed if the tape unit is not attached or the string value of expression is an empty string (''). |
The then clause is executed if the writet is successful. Either else or onerr can be specified, but not both. In addition, the onerr clause can be used to check for tape error conditions by interrogating the system(0) function.
record = name ’l#20’ : address ’l#15’ writet record else stop
else clause, if statement, onerr clause, readt statement, set-device command, set-floppy command, set-half command, set-sct command, statement blocks, Statements and functions, system() function, t-att command, t-select command, t-stat command, then clause, then/else statement blocks, weof statement