Re: and then... (a curiosity)



On 29 Sie, 23:47, Samuel Tardieu <s...@xxxxxxxxxxx> wrote:

Sometimes, you want to ensure that both sides of the boolean operator
have been evaluated. Here is an example:

  --  Send the message to the log and return True if it
  --  has been logged at least at one place succesfully.

  function Log (Message : String) return Boolean is
  begin
     return Log_To_Network (Message) or Log_To_Disk (Message);
  end Log;

This is actually a bad example. It might use "or else" and still
retain the semantics as described in the comment above.

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada
.



Relevant Pages