Mercurial > octave-dspies
view 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 |
line wrap: on
line source
subroutine fortransub (n, a, s) implicit none character*(*) s real*8 a(*) integer*4 i, n, ioerr do i = 1, n if (a(i) .eq. 0d0) then call xstopx ('fortransub: divide by zero') else a(i) = 1d0 / a(i) endif enddo write (unit = s, fmt = '(a,i3,a,a)', iostat = ioerr) $ 'There are ', n, $ ' values in the input vector', char(0) if (ioerr .ne. 0) then call xstopx ('fortransub: error writing string') endif return end