Mercurial > octave
annotate scripts/io/beep.m @ 23083:e9a0469dedd9 stable
maint: strip extra trailing newlines from files.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 20 Jan 2017 12:19:08 -0500 |
parents | bac0d6f07a3e |
children | ef4d915df748 3ac9f9ecfae5 |
rev | line source |
---|---|
22323
bac0d6f07a3e
maint: Update copyright notices for 2016.
John W. Eaton <jwe@octave.org>
parents:
21634
diff
changeset
|
1 ## Copyright (C) 2003-2016 John W. Eaton |
4263 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7016 | 7 ## the Free Software Foundation; either version 3 of the License, or (at |
8 ## your option) any later version. | |
4263 | 9 ## |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
7016 | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | |
4263 | 18 |
19 ## -*- texinfo -*- | |
20852
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20716
diff
changeset
|
20 ## @deftypefn {} {} beep () |
4293 | 21 ## Produce a beep from the speaker (or visual bell). |
20160
03b9d17a2d95
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
22 ## |
20317
2ec049e50ed8
doc: Fix backslash characters in docstrings
Mike Miller <mtmiller@octave.org>
parents:
20160
diff
changeset
|
23 ## This function sends the alarm character @qcode{"@xbackslashchar{}a"} to |
20716
1ecee53513d7
doc: Peridodic grammar check of documentation.
Rik <rik@octave.org>
parents:
20317
diff
changeset
|
24 ## the terminal. Depending on the user's configuration this may produce an |
20317
2ec049e50ed8
doc: Fix backslash characters in docstrings
Mike Miller <mtmiller@octave.org>
parents:
20160
diff
changeset
|
25 ## audible beep, a visual bell, or nothing at all. |
21634
96518f623c91
Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents:
21633
diff
changeset
|
26 ## @seealso{puts, fputs, printf, fprintf} |
4263 | 27 ## @end deftypefn |
28 | |
29 ## Author: jwe | |
30 | |
31 function beep () | |
32 | |
13041
e5a49b2f8225
codesprint: Single input validation test for beep.m
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
33 if (nargin != 0) |
6046 | 34 print_usage (); |
4268 | 35 endif |
4263 | 36 |
21634
96518f623c91
Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents:
21633
diff
changeset
|
37 puts ("\a"); |
13041
e5a49b2f8225
codesprint: Single input validation test for beep.m
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
38 |
4263 | 39 endfunction |
13041
e5a49b2f8225
codesprint: Single input validation test for beep.m
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
40 |
e5a49b2f8225
codesprint: Single input validation test for beep.m
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
41 |
e5a49b2f8225
codesprint: Single input validation test for beep.m
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
42 %!error (beep (1)) |