• Aucun résultat trouvé

DISABLE INTR 7 DISABLE INTR Isc

Dans le document BASIC Language Reference (Page 177-186)

DISABLE INTR

DISABLE INTR 7 DISABLE INTR Isc

Supported on Option Required Keyboard Executable Programmable In an IF . .. THEN

WS,UX 10 Yes Yes Yes This statement disables interrupts from an interface by turning off the interrupt gener-ating mechanism on thp interface.

o

DISABLE INTR ~ select code interface ~

Example Statements

DISABLE INTR 7 DISABLE INTR Isc

Supported on Option Required Keyboard Executable Programmable In an IF ... THEN

WS,UX None Yes Yes Yes

DISP

This statement causes the display items to be sent to the display line on the CRT.

Ul E

..., QJ QJ

en ro E

Ul E

..., QJ

>-ro

0.

Ul D

r

literal form of image specifIer

Image specIfIer lIst

image specIfIer list

traIling punctuatIon not allowed with USING

tab functIon not allowed wIth USING

Radix speclfier cannot be used without a dlgit specifier

Item Description Range image line label

image line number

name identifying an IMAGE statement any valid name integer constant identifying an IMAGE 1 thru 32766 statement

numeric expression, rounded to an integer literal

literal string constant composed of characters quote mark not allowed entered from the keyboard, including those

generated using the

I

ANY CHAR

I

key

Example Statements

DISP PromptS;

DISP TAB(5) ,First,TAB(20) ,Second DISP USING 15Z.DD";Money

Semantics

Standard Numeric Format

The standard numeric format depends on the value of the number being displayed. If the absolute value of the number is greater than or equal to 1E-4 and less than 1E+6, it is rounded to 12 digits and displayed in floating point notation. If it is not within these limits, it is displayed in scientific notation. The standard numeric format is used unless USING is selected, and may be specified by using K in an image specifier.

COMPLEX numbers are treated like two REAL numbers separated by a semicolon.

Automatic End-Of-Line Sequence

After the display list is exhausted, an End Of Line (EOL) sequence is sent to the display line, unless it is suppressed by trailing punctuation or a pound-sign image specifier.

Control Codes

Some ASCII control codes have a special effect in DISP statements:

Character Keystroke Name Action

CHR$(7) CTRL-G bell Sound the beeper

CHR$(8) CTRL-H backspace Move the cursor back one character.

CHR$(12) CTRL-L form-feed Clear the display line.

CHR$(13) CTRL-M carriage-return Move the cursor to column 1. The next character sent to the display clears the display line, unless it is a carriage-return.

CRT Enhancements

There are several character enhancements (such as inverse and underlining) available on some CRTs. They are accessed through characters with decimal values above 127. For a list of the characters and their effects, see the "Display Enhancement Characters" table in "Useful Tables" at the back of this book.

Arrays

Entire arrays may be displayed using the asterisk specifier. Each element in an array is treated as a separate item by the DISP statement, as if the items were listed separately, separated by the punctuation following the array specifier. If no punctation follows the array specifier, a comma is assumed. COMPLEX array elements are treated as if the real and imaginary parts are separated by a semicolon. The array is output in row major order (rightmost subscript varies fastest).

Display Without USING

If DISP is used without USING, the punctuation following an item determines the width of the item's display field; a semicolon selects the compact field, and a comma selects the default display field. When the display item is an array with the asterisk array specifier, each array element is considered a separate display item. Any trailing punctation will suppress the automatic EOL sequence, in addition to selecting the display field to be used for the display item preceding it.

The compact field is slightly different for numeric and string items. Numeric items are displayed with one trailing blank. String items are displayed with no leading or trailing blanks.

The default display field displays items with trailing blanks to fill to the beginning of the next lO-character field.

Numeric data is displayed with one leading blank if the number is positive, or with a minus sign if the number is negative, whether in compact or default field.

In the TAB function, a column parameter less than one is treated as one. A column parameter greater than the screen width (in characters) is treated as equal to the screen width.

Display With USING

When the computer executes a DISP USING statement, it reads the image specifier, acting on each field specifier (field specifiers are separated from each other by commas) as it is encountered. If nothing is required from the display items, the field specifier is acted upon without accessing the display list. When the field specifer requires characters, it accesses the next item in the display list, using the entire item. Each element in an provided by the field specifier, an error is generated. A minus sign takes a digit place if M or S is not used, and can generate unexpected overflows of the image field. If the number contains more digits to the right of the decimal point than specified, it is rounded to fit the specifier.

If a string is longer than the field specifier, it is truncated, and the rightmost characters are lost. If it is shorter than the specifer, trailing blanks are used to fill out the field.

Effects of the image specifiers on the DISP statement are shown in the following table: is negative and no sign image is specified, the minus sign will occupy a leading digit position. If a sign is displayed, it will "float" to the left of the left-most digit.

Z Same as D, except that leading zeros are displayed.

*

Same as Z, except that asterisks are displayed instead of leading zeros. (Requires 10)

Displays a decimal-point radix indicator.

R Displays a comma radix indicator (European radix). (Requires 10) E Displays an E, a sign, and a two-digit exponent.

ESZ Displays an E, a sign, and a one-digit exponent.

ESZZ Same as E.

ESZZZ Displays an E, a sign, and a three-digit exponent.

A Displays a string character. Trailing blanks are output if the number of characters specified is greater than the number available in the corresponding string. If the image specifier is exhausted before the corresponding string, the remaining characters are ignored.

X Displays a blank.

literal Displays the characters contained in the literal.

Image

Specifier Meaning

B Displays the character represented by one byte of data. This is similar to the CHR$

function. The number is rounded to an INTEGER, and the least-significant byte is sent. If the number is greater than 32767, then 255 is used; if the number is less than -32768, then 0 is used.

W Displays two characters represented by the two bytes of a 16-bit, two's-complement integer. The corresponding numeric item is rounded to an INTEGER. If it is greater than 32767, then 32767 is used; if it is less than -32768, then -32768 is used.

The most-significant byte is sent first.

y Same as W. (Requires 10)

# Suppresses the automatic output of an EOL (End-Of-Line) sequence following the last display item.

% Ignored in DISP images.

+

Changes the automatic EOL sequence that normally follows the last display item to a single carriage-return. (Requires 10)

- Changes the EOL automatic sequence that normally follows the last display item to a single line-feed. (Requires 10)

/

Sends a carriage-return and a line-feed to the display line.

L Same as /.

@ Sends a form-feed to the display line.

Supported on Option Required Keyboard Executable Programmable In an IF ... THEN

WS,UX CRTX Yes Yes Yes

Dans le document BASIC Language Reference (Page 177-186)

Documents relatifs