Previous | Contents | Index |
The LSET statement assigns left-justified data to a string variable. LSET does not change the length of the destination string variable.
DECLARE STRING alpha alpha = "ABCDE" LSET alpha = "FGHIJKLMN" PRINT alpha |
Output
FGHIJ |
The MAG function returns the absolute value of a specified expression. The returned value has the same data type as the expression.
None
DECLARE SINGLE A A = -34.6 PRINT MAG(A) |
Output
34.6 |
The MAGTAPE function permits your program to control unformatted magnetic tape files.
The MAGTAPE function is supported only for compatibility with BASIC-PLUS-2. It is recommended that you do not use the MAGTAPE function for new program development. |
Code | Function | BASIC Action |
---|---|---|
2 | Write EOF |
Close channel with the CLOSE
statement. |
3 | Rewind tape | Use the RESTORE # statement, the REWIND clause on an OPEN statement, or the MAGTAPE function. |
4 | Skip records | Perform GET operations, ignore data until reaching desired record. |
5 | Backspace | Rewind tape, perform GET operations, ignore data until reaching desired record. |
6 | Set density or set parity |
Use the DCL commands
MOUNT/DENSITY and MOUNT/FOREIGN or the $MOUNT system service. |
7 | Get status | Use the RMSSTATUS function. |
I = MAGTAPE (3%,0%,2%) |
The MAP statement defines a named area of statically allocated storage called a PSECT, declares data fields in the record, and associates them with program variables.
MAP (ABC) LONG A, B MAP (ABC) LONG A, C ! This MAP statement is valid MAP (ABC) LONG B, A ! This MAP statement produces an error MAP (ABC) WORD A, B ! This MAP statement produces an error |
MAP (BUF1) BYTE AGE, STRING emp_name = 20 & SINGLE emp_num MAP (BUF1) BYTE FILL, STRING last_name (11) = 12, & FILL = 8, SINGLE FILL |
The MAP DYNAMIC statement names the variables and arrays whose size and position in a storage area can change at run time. The MAP DYNAMIC statement is used in conjunction with the REMAP statement. The REMAP statement defines or redefines the position in the storage area of variables named in the MAP DYNAMIC statement.
100 MAP (MY.BUF) STRING DUMMY = 512 MAP DYNAMIC (MY.BUF) STRING LAST, FIRST, MIDDLE, & BYTE AGE, STRING EMPLOYER, & STRING CHARACTERISTICS |
The MAR function returns the current margin width of a specified channel.
The file associated with chnl-exp must be open.
DECLARE INTEGER width MARGIN #0, 80 width = MAR(0) PRINT width |
Output
80 |
The MARGIN statement specifies the margin width for a terminal or for records in a terminal-format file.
OPEN "EMP.DAT" FOR OUTPUT AS #1 MARGIN #1, 132 . . . |
The MAT statement lets you implicitly create and manipulate one- and two-dimensional arrays. You can use the MAT statement to assign values to array elements, or to redimension a previously dimensioned array. You can also perform matrix arithmetic operations such as multiplication, addition, and subtraction, and other matrix operations such as transposing and inverting matrices.
Previous | Next | Contents | Index |