TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Simon Wright <[log in to unmask]>
Reply To:
Simon Wright <[log in to unmask]>
Date:
Sun, 15 Aug 1999 08:51:56 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (44 lines)
> From: Rick Duley <[log in to unmask]>

> Why is it that user-defined exceptions are treated in a different manner
> from the pre-defined ones?  What happens to the <LT> character (which I
> assume to be remaining in the buffer and causing the loop) in the
> Range_Error situation?

Try entering eg 1 0 1 x x x RET:

  pogner[9]$ ./invalid_data_loop_test
  Enter an Integer between 0 and 100 (100 to QUIT) : 101xxx


  You Goofed - Value Range

  Enter an Integer between 0 and 100 (100 to QUIT) :

  You Goofed

  Enter an Integer between 0 and 100 (100 to QUIT) :

  You Goofed

... etc.

I /suspect/ (don't use Ada text input a lot) that the <LF> (I guess
you mean that?) is treated as white space before the input of the next
number ..

  pogner[10]$ ./invalid_data_loop_test
  Enter an Integer between 0 and 100 (100 to QUIT) : 1

  The number entered was : 1

  Enter an Integer between 0 and 100 (100 to QUIT) :       2

  The number entered was : 2

  Enter an Integer between 0 and 100 (100 to QUIT) : 100

  pogner[11]$

HTH

ATOM RSS1 RSS2