Jump to content

Terminal control/Ringing the terminal bell: Difference between revisions

→‎{{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:
Standard compliant:
{{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}}
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.