Anonymous user
Terminal control/Ringing the terminal bell: Difference between revisions
Terminal control/Ringing the terminal bell (view source)
Revision as of 18:54, 24 August 2023
, 10 months ago→{{header|COBOL}}: added another implementation
imported>Acediast (→{{header|COBOL}}: completed standard-compliant program) |
imported>Acediast (→{{header|COBOL}}: added another implementation) |
||
Line 292:
=={{header|COBOL}}==
Using the standard screen section:
{{works with|GnuCOBOL}}
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION.
Line 306:
END PROGRAM ring-terminal-bell.</syntaxhighlight>
Using the ASCII code directly:
{{works with|GnuCOBOL}}
<syntaxhighlight lang="cobol"> *> Tectonics: cobc -xj ring-terminal-bell.cob -fnot-reserved=ASCII
IDENTIFICATION DIVISION.
PROGRAM-ID. ring-ascii-bell.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
OBJECT-COMPUTER.
PROGRAM COLLATING SEQUENCE IS ASCII.
SPECIAL-NAMES.
ALPHABET ASCII IS STANDARD-1.
PROCEDURE DIVISION.
DISPLAY FUNCTION CHAR(8) WITH NO ADVANCING
GOBACK.
END PROGRAM ring-ascii-bell.</syntaxhighlight>
{{works with|Visual COBOL}}
|