Bell
Jump to navigation
Jump to search
BELL
The BELL internal function returns a character which, when printed, sounds the printer's or terminal's bell. It is used mainly in PRINT statements.
Comments and Examples
00010 PRINT BELL 00020 PRINT #255: BELL, BELL, BELL 00030 PRINT BELL; 00040 PRINT BELL, NEWPAGE, "ERROR"
Line 10 causes a tone or beep to sound at the terminal. Line 20 causes the printer's bell (if it has one) to sound three times. Line 30 produces a beep at the terminal, but keeps the cursor on the same line; this variation is often useful with full screen processing. Line 40 sounds the tone, clears the screen and prints the message ERROR at the bottom of the screen.
Related Functions
Technical Considerations
- In an unformatted PRINT statement, when BELL precedes the TAB(X) function, the TAB function will appear to be off by one column because the character for BELL appears in the output buffer, but not on the screen or printer. Avoid using BELL (or NEWPAGE) before TAB in an unformatted PRINT statement. One remedy is to use one PRINT statement for BELL (and NEWPAGE) and another for the TAB function and other output.