Mercurial > octave-dspies
annotate examples/fortransub.f @ 18710:584b20e9112c gui-release
use shortcut manager for the main help menu
* main_window.cc (add_action): new parameter for the signal receiver;
(construct_help_menu): use add_action for the actions of the menu;
(construct_documentation_menu): use add_action for the actions of the menu;
(set_global_shortcuts): set/unset shortcuts
* main-window.h: actions are class variables, add_action with new parameter
* shortcut-manager.cc (do_init_data): initialize the shortcuts in the help menu
author | Torsten <ttl@justmail.de> |
---|---|
date | Thu, 01 May 2014 12:12:08 +0200 |
parents | 4b32677b6229 |
children |
rev | line source |
---|---|
18369
4b32677b6229
Rename Fortran example files from 'fort' prefix to 'fortran' prefix.
Rik <rik@octave.org>
parents:
9053
diff
changeset
|
1 subroutine fortransub (n, a, s) |
6572 | 2 implicit none |
3 character*(*) s | |
4 real*8 a(*) | |
5 integer*4 i, n, ioerr | |
6 do i = 1, n | |
7 if (a(i) .eq. 0d0) then | |
18369
4b32677b6229
Rename Fortran example files from 'fort' prefix to 'fortran' prefix.
Rik <rik@octave.org>
parents:
9053
diff
changeset
|
8 call xstopx ('fortransub: divide by zero') |
6572 | 9 else |
10 a(i) = 1d0 / a(i) | |
11 endif | |
12 enddo | |
13 write (unit = s, fmt = '(a,i3,a,a)', iostat = ioerr) | |
7081 | 14 $ 'There are ', n, |
15 $ ' values in the input vector', char(0) | |
6572 | 16 if (ioerr .ne. 0) then |
18369
4b32677b6229
Rename Fortran example files from 'fort' prefix to 'fortran' prefix.
Rik <rik@octave.org>
parents:
9053
diff
changeset
|
17 call xstopx ('fortransub: error writing string') |
6572 | 18 endif |
19 return | |
20 end | |
21 |