comp.lang.ada
 help / color / mirror / Atom feed
From: dale@cs.rmit.edu.au (Dale Stanbrough)
Subject: Re: Troubles with MessageBeep | Beep...
Date: 1999/07/15
Date: 1999-07-15T09:21:07+00:00	[thread overview]
Message-ID: <dale-1507991921080001@192.168.0.2> (raw)
In-Reply-To: 2461CF0DA7DBD211B07300805F921CBC01D8B985@kuumex03.barco.com

SEV, AV Guest 2" <avguest2@barco.com> wrote:

"   procedure Button1_Click is 
      b : Win32.bool;  
    begin
      b:=Beep(5000,5000);
    end Button1_Click;"
  

Why does it return a boolean?

On a related note, when I am calling a lot of Unix functions, and
don't want to check the return value, I sometimes do the following...

   declare
      Result : Natural;
   begin
      Result := F1 (...);
      Result := F2 (...);
   exception
      when constraint_error => <function failed>
   end;

...so would

   subtype Ok is Boolean range true..true;

   Ok := Beep (...);

compile without the constraint check being optimised away (
would that be a legal optimisation)?

Dale




  reply	other threads:[~1999-07-15  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-15  0:00 Re : Troubles with MessageBeep | Beep SEV, AV Guest 2
1999-07-15  0:00 ` Dale Stanbrough [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-07-15  0:00 SEV, AV Guest 2
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox