Terminal control/Ringing the terminal bell: Difference between revisions

Content deleted Content added
JDDev0 (talk | contribs)
Add lang example
imported>Acediast
→‎{{header|COBOL}}: completed standard-compliant program
Line 293: Line 293:
=={{header|COBOL}}==
=={{header|COBOL}}==
Standard compliant:
Standard compliant:
{{works with|GnuCOBOL}}
<syntaxhighlight lang="cobol">DISPLAY SPACE WITH BELL</syntaxhighlight>
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION.
PROGRAM-ID. ring-terminal-bell.

DATA DIVISION.
SCREEN SECTION.
01 ringer BELL.

PROCEDURE DIVISION.
DISPLAY ringer
GOBACK.

END PROGRAM ring-terminal-bell.</syntaxhighlight>


{{works with|Visual COBOL}}
{{works with|Visual COBOL}}
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION.
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION.
PROGRAM-ID. mf-bell.
PROGRAM-ID. mf-bell.

DATA DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
WORKING-STORAGE SECTION.
01 bell-code PIC X USAGE COMP-X VALUE 22.
01 bell-code PIC X USAGE COMP-X VALUE 22.
01 dummy-param PIC X.
01 dummy-param PIC X.

PROCEDURE DIVISION.
PROCEDURE DIVISION.
CALL X"AF" USING bell-code, dummy-param
CALL X"AF" USING bell-code, dummy-param
GOBACK.

GOBACK
.</syntaxhighlight>
END PROGRAM mf-bell.</syntaxhighlight>


=={{header|Common Lisp}}==
=={{header|Common Lisp}}==