7.5 bell command (26.7.01)

7.5.1 Edward Collett (26.7.01)

More shocking is that there is no bell command! Something I had in BASIC 20 years ago. I think that this is because the folks at MAPLE don’t do calculations that last more than 1 minute......

7.5.2 Thomas Richard (1.8.01)

In the command line versions (preferable for long running calculations), you should use

printf("\a");

which emits the bell character at least on Unix and Windows. A more general approach might be to call an external beeper tool with system() or ssystem().

7.5.3 Carl DeVore (3.8.01)

To get a bell on Unix, do

 system("echo \a");

I don’t know what to do for Windows. You could probably write a trivial program in C and call it with system.

7.5.4 Helmut Kahovec (9.8.01)

Carl DeVore wrote: ...

Well, on a PC running MS Windows NT 4.0 and Maple6 the following works, i.e. beeps, too:

> system("echo \a"); 
                    0
 

7.5.5 Edward Collett (11.8.01)

Helmut Kahovec wrote: ...

Your Bell Command worked! Congratulations and many thanks! I used Windows 98 and MAPLE 6. Now, for an equally challenging problem. Do you know how to program a BELL command so that the bell sound continues with a time delay between bell sounds, e.g., 10 seconds?

7.5.6 Carl DeVore (13.8.01)

Helmut Kahovec wrote: ...

Works on Windows Me also, but (apparently, for me, at least) not on Window 95. I haven’t tried, Windows 98 yet.

7.5.7 Helmut Kahovec (16.8.01)

Edward Collett wrote: ...

Well, I would do it that way:

 
> delay,maxcount:=2.0,10: 
 
> while maxcount>0 do 
    system("echo \a"); 
    t0:=time(); 
    while time()-t0<delay do end do; 
    maxcount:=maxcount-1 
  end do:
 

Of course you may change the maximum number of beeps (’maxcount’) and the delay (’delay’).

7.5.8 Carl DeVore (21.8.01)

Helmut Kahovec wrote: ...

The following way will beep until you kill it, and also uses real time rather than computation time.

> RepeatBeep:= proc(delay) 
>   local t0; 
>   do 
>      t0:= iolib(25); 
>      system("echo \a"); 
>      while abs(iolib(25)-t0) < delay do od 
>   od 
> end proc:
 

However, I did not propose this solution before because my experience is that if you overuse the system command, Windows, not just Maple, will crash, or become unstable. This, of course, applies to both of our solutions.

The "experience" I refer to is with Windows ME. Perhaps other Windows versions hold up better.

So I think that the best idea is to use a Windows "alarm" utility and use ONE system command to call it. Surely such an alarm utility is available for free somewhere.