comp.lang.ada
 help / color / mirror / Atom feed
* Error "exception not permitted here" when putting EXCEPTION in a loop
@ 2015-07-17 15:47 Trish Cayetano
  2015-07-17 15:56 ` David Botton
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Trish Cayetano @ 2015-07-17 15:47 UTC (permalink / raw)


Hi, 

I am getting error "exception not permitted here" when running below in a loop. 
Well it runs if I put it outside the loop but I need it inside the loop... 

           exception
            when ADA.IO_EXCEPTIONS.DATA_ERROR =>
            Ada.Text_IO.Put_Line ("Try a number from 1 to 4, Buddy");

Thanks in advance for your help...


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-17 15:47 Error "exception not permitted here" when putting EXCEPTION in a loop Trish Cayetano
@ 2015-07-17 15:56 ` David Botton
  2015-07-17 15:58 ` G.B.
  2015-07-17 16:02 ` Björn Lundin
  2 siblings, 0 replies; 15+ messages in thread
From: David Botton @ 2015-07-17 15:56 UTC (permalink / raw)


> I am getting error "exception not permitted here" when running below in a loop. 
> Well it runs if I put it outside the loop but I need it inside the loop... 

Post the entire portion of code (then we know also not a school assignment you haven't tried yet on your own) not just the exception section of a block.

David Botton


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-17 15:47 Error "exception not permitted here" when putting EXCEPTION in a loop Trish Cayetano
  2015-07-17 15:56 ` David Botton
@ 2015-07-17 15:58 ` G.B.
  2015-07-18  8:14   ` Trish Cayetano
  2015-07-17 16:02 ` Björn Lundin
  2 siblings, 1 reply; 15+ messages in thread
From: G.B. @ 2015-07-17 15:58 UTC (permalink / raw)


On 17.07.15 17:47, Trish Cayetano wrote:
> Hi,
>
> I am getting error "exception not permitted here" when running below in a loop.
> Well it runs if I put it outside the loop but I need it inside the loop...
>
>             exception
>              when ADA.IO_EXCEPTIONS.DATA_ERROR =>
>              Ada.Text_IO.Put_Line ("Try a number from 1 to 4, Buddy");
>
> Thanks in advance for your help...
>

does it look like

  loop
     ...
    exception ...
     ...
  end loop

If so, then note that "exception" must be in a block,
such as a procedure body, or a block statement (LRM 5.6):


   loop
     begin
       ...  -- handled sequence of statements
     exception ...
     ...
     end;
   end loop

More complete examples would help reducing guess work.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-17 15:47 Error "exception not permitted here" when putting EXCEPTION in a loop Trish Cayetano
  2015-07-17 15:56 ` David Botton
  2015-07-17 15:58 ` G.B.
@ 2015-07-17 16:02 ` Björn Lundin
  2 siblings, 0 replies; 15+ messages in thread
From: Björn Lundin @ 2015-07-17 16:02 UTC (permalink / raw)


On 2015-07-17 17:47, Trish Cayetano wrote:
> Hi, 
> 
> I am getting error "exception not permitted here" when running below in a loop. 
> Well it runs if I put it outside the loop but I need it inside the loop... 
> 
>            exception
>             when ADA.IO_EXCEPTIONS.DATA_ERROR =>
>             Ada.Text_IO.Put_Line ("Try a number from 1 to 4, Buddy");
> 
> Thanks in advance for your help...
> 

-- basic procedure
procedure bla is
begin
  null;
exception
  when Constraint_error => null;
end bla;



procedure bla is
begin

  -- catch 1 exception and then fall out of loop
  begin
    loop
      do_stuff;
    end loop;
  exception
    when Constraint_error => null;
  end;

-- or perhaps

  -- catch exception outside every invocation of do_stuff
  -- not falling out of loop
  loop
    begin
      do_stuff;
    exception
      when Constraint_error => null;
    end;
  end loop;


exception
  when Constraint_error => null;
end bla;




-- 
--
Björn


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-17 15:58 ` G.B.
@ 2015-07-18  8:14   ` Trish Cayetano
  2015-07-18 10:08     ` Björn Lundin
  0 siblings, 1 reply; 15+ messages in thread
From: Trish Cayetano @ 2015-07-18  8:14 UTC (permalink / raw)


On Friday, July 17, 2015 at 11:58:18 PM UTC+8, G.B. wrote:
> On 17.07.15 17:47, Trish Cayetano wrote:
> > Hi,
> >
> > I am getting error "exception not permitted here" when running below in a loop.
> > Well it runs if I put it outside the loop but I need it inside the loop...
> >
> >             exception
> >              when ADA.IO_EXCEPTIONS.DATA_ERROR =>
> >              Ada.Text_IO.Put_Line ("Try a number from 1 to 4, Buddy");
> >
> > Thanks in advance for your help...
> >
> 
> does it look like
> 
>   loop
>      ...
>     exception ...
>      ...
>   end loop
> 
> If so, then note that "exception" must be in a block,
> such as a procedure body, or a block statement (LRM 5.6):
> 
> 
>    loop
>      begin
>        ...  -- handled sequence of statements
>      exception ...
>      ...
>      end;
>    end loop
> 
> More complete examples would help reducing guess work.

Thanks, David and GB.
It still does not work... 
Here is my own code (i removed the functions and others)... Sorry I am really new to Ada. I actually tried also to put another loop and added declare, begin and end. It hang after I ran. And when I terminated the process, it looks like it ran infinitely in loops. 

   
===== 
--start of code

   with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Numerics.Discrete_Random;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO.Unbounded_IO; use Ada.Text_IO.Unbounded_IO;
with Ada.IO_Exceptions; use Ada.IO_Exceptions;

procedure Main is

   GuessWord : String(1..20);
   last: Natural;
 
   option : Integer := 0;
 
   endGame: Boolean := False;


begin

    while not endGame loop

      loop
         begin

      Ada.Text_IO.Put_Line(" | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit ");
      Ada.Integer_Text_IO.Get(option);

      case option is
         when 1 =>
            Ada.Text_IO.Put_Line("Shuffle");
         when 2 =>
            Ada.Text_IO.Put_Line("Pass");
         when 3 =>
            Skip_Line;
            Ada.Text_IO.Put_Line("Enter word: ");
            Ada.Text_IO.Get_Line(GuessWord, Last);
         when 4 =>
            Ada.Text_IO.Put_Line("See you again soon!");
            endGame := true;
         when others =>
            Ada.Text_IO.Put_Line("Invalid Option");


      end case;

            exception
            when ADA.IO_EXCEPTIONS.Data_Error =>
            Ada.Text_IO.Put_Line ("Try a number from 1 to 4, Buddy");




         end;
          end loop;
      end loop;


end Main;



--end of code
==============
RESULT:

C:\Users\a0284014\Desktop\ada\exception\obj\main
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
1
Shuffle
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
e
Try a number from 1 to 4, Buddy
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
Try a number from 1 to 4, Buddy
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
Try a number from 1 to 4, Buddy
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
Try a number from 1 to 4, Buddy
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 

--retracted repeats
[2015-07-18 16:11:13] process exited with status 1, elapsed time: 19.58s

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-18  8:14   ` Trish Cayetano
@ 2015-07-18 10:08     ` Björn Lundin
  2015-07-18 12:41       ` Trish Cayetano
  0 siblings, 1 reply; 15+ messages in thread
From: Björn Lundin @ 2015-07-18 10:08 UTC (permalink / raw)


On 2015-07-18 10:14, Trish Cayetano wrote:

e is my own code (i removed the functions and others)... S

orry I am really new to Ada. I actually tried also to put

another loop and added declare, begin and end. It

hang after I ran. And when I terminated the process, it looks like it
ran infinitely in loops.
> 

when you set endGame to true,
you are in the *inner* loop.
but the *outer* loop tests for endGame.

How do you exit the *inner* loop?

what purpose has the *inner* loop?

When you have the answer,
your program will be easy to fix.

--
Björn


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-18 10:08     ` Björn Lundin
@ 2015-07-18 12:41       ` Trish Cayetano
  2015-07-18 13:56         ` Björn Lundin
  0 siblings, 1 reply; 15+ messages in thread
From: Trish Cayetano @ 2015-07-18 12:41 UTC (permalink / raw)


On Saturday, July 18, 2015 at 6:07:12 PM UTC+8, björn lundin wrote:
> On 2015-07-18 10:14, Trish Cayetano wrote:
> 
> e is my own code (i removed the functions and others)... S
> 
> orry I am really new to Ada. I actually tried also to put
> 
> another loop and added declare, begin and end. It
> 
> hang after I ran. And when I terminated the process, it looks like it
> ran infinitely in loops.
> > 
> 
> when you set endGame to true,
> you are in the *inner* loop.
> but the *outer* loop tests for endGame.
> 
> How do you exit the *inner* loop?
> 
> what purpose has the *inner* loop?
> 
> When you have the answer,
> your program will be easy to fix.
> 
> --
> Björn

Hello Björn, 

I don't need the inner loop after all.
I removed the inner loop but it still run in infinite loops.

REVISED CODE:

with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Numerics.Discrete_Random;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO.Unbounded_IO; use Ada.Text_IO.Unbounded_IO;
with Ada.IO_Exceptions; use Ada.IO_Exceptions;

procedure Main is

   GuessWord : String(1..20);
   last: Natural;

   option : Integer := 0;

   endGame: Boolean := False;


begin

    while not endGame loop


         begin

      Ada.Text_IO.Put_Line(" | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit ");
      Ada.Integer_Text_IO.Get(option);

      case option is
         when 1 =>
            Ada.Text_IO.Put_Line("Shuffle");
         when 2 =>
            Ada.Text_IO.Put_Line("Pass");
         when 3 =>
            Skip_Line;
            Ada.Text_IO.Put_Line("Enter word: ");
            Ada.Text_IO.Get_Line(GuessWord, Last);
         when 4 =>
            Ada.Text_IO.Put_Line("See you again soon!");
            endGame := true;
         when others =>
            Ada.Text_IO.Put_Line("Invalid Option");


      end case;

            Skip_Line;
            exception
            when ADA.IO_EXCEPTIONS.Data_Error =>
            Ada.Text_IO.Put_Line ("Try a number from 1 to 4, Buddy");
           



         end;
      
          end loop;



end Main;


RESULT:
C:\Users\a0284014\Desktop\ada\exception\obj\main
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
f
Try a number from 1 to 4, Buddy
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
Try a number from 1 to 4, Buddy
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
Try a number from 1 to 4, Buddy
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
Try a number from 1 to 4, Buddy
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
Try a number from 1 to 4, Buddy

[2015-07-18 20:39:33] process exited with status 1, elapsed time: 10.81s

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-18 12:41       ` Trish Cayetano
@ 2015-07-18 13:56         ` Björn Lundin
  2015-07-18 14:08           ` Niklas Holsti
  2015-07-18 14:32           ` Trish Cayetano
  0 siblings, 2 replies; 15+ messages in thread
From: Björn Lundin @ 2015-07-18 13:56 UTC (permalink / raw)


On 2015-07-18 14:41, Trish Cayetano wrote:
> Hello Björn, 
> 
> I don't need the inner loop after all.
> I removed the inner loop but it still run in infinite loops.

it runs fine as long as you do not enter a non-digit.
Then it seems like the call to
  Ada.Integer_Text_IO.Get(option);
does not clear the buffer.

if fed a character, Data_error is raised - which is correct.
But the next time the code enters the loop, it seems it does
not wait for input again.
It raises the data_error again, and the infinite loop is there.

Seems like a compiler bug to me, but the behavior of *text_io.get
has surprised me before.

--
Björn


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-18 13:56         ` Björn Lundin
@ 2015-07-18 14:08           ` Niklas Holsti
  2015-07-18 14:56             ` Björn Lundin
  2015-07-18 14:32           ` Trish Cayetano
  1 sibling, 1 reply; 15+ messages in thread
From: Niklas Holsti @ 2015-07-18 14:08 UTC (permalink / raw)


On 15-07-18 16:56 , Björn Lundin wrote:
> On 2015-07-18 14:41, Trish Cayetano wrote:
>> Hello Björn,
>>
>> I don't need the inner loop after all.
>> I removed the inner loop but it still run in infinite loops.
>
> it runs fine as long as you do not enter a non-digit.
> Then it seems like the call to
>    Ada.Integer_Text_IO.Get(option);
> does not clear the buffer.
>
> if fed a character, Data_error is raised - which is correct.
> But the next time the code enters the loop, it seems it does
> not wait for input again.
> It raises the data_error again, and the infinite loop is there.
>
> Seems like a compiler bug to me, but the behavior of *text_io.get
> has surprised me before.

It is specified in the LRM that if the Get for Integer_IO encounters a 
character that cannot be part of the integer number, it stops at that 
point and does not "pass" that character. This means that one can read 
the integer 123 from the text "123ABC" and then read the string "ABC"; 
the Get for the integer does not "consume" the "A".

If you want to "clear the buffer", you should call Skip_Line, also in 
the exception handler.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-18 13:56         ` Björn Lundin
  2015-07-18 14:08           ` Niklas Holsti
@ 2015-07-18 14:32           ` Trish Cayetano
  2015-07-18 14:59             ` Björn Lundin
  2015-07-18 16:09             ` Dennis Lee Bieber
  1 sibling, 2 replies; 15+ messages in thread
From: Trish Cayetano @ 2015-07-18 14:32 UTC (permalink / raw)


On Saturday, July 18, 2015 at 9:55:12 PM UTC+8, björn lundin wrote:
> On 2015-07-18 14:41, Trish Cayetano wrote:
> > Hello Björn, 
> > 
> > I don't need the inner loop after all.
> > I removed the inner loop but it still run in infinite loops.
> 
> it runs fine as long as you do not enter a non-digit.
> Then it seems like the call to
>   Ada.Integer_Text_IO.Get(option);
> does not clear the buffer.
> 
> if fed a character, Data_error is raised - which is correct.
> But the next time the code enters the loop, it seems it does
> not wait for input again.
> It raises the data_error again, and the infinite loop is there.
> 
> Seems like a compiler bug to me, but the behavior of *text_io.get
> has surprised me before.
> 
> --
> Björn

Well which reminds me! I added a SKIP_LINE... The expected output is close... It shows the exception error every other input... it waits for 2 inputs and then 1 input and then 2... 

REVISED

with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Numerics.Discrete_Random;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO.Unbounded_IO; use Ada.Text_IO.Unbounded_IO;
with Ada.IO_Exceptions; use Ada.IO_Exceptions;

procedure Main is

   GuessWord : String(1..20);
   last: Natural;

   option : Integer := 0;

   endGame: Boolean := False;


begin

    while not endGame loop


         begin

         Ada.Text_IO.Put_Line(" | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit ");
         Skip_Line;
         Ada.Integer_Text_IO.Get(option);
         
          exception
            when ADA.IO_EXCEPTIONS.Data_Error =>
            Ada.Text_IO.Put_Line ("Try a number from 1 to 4, Buddy");


      case option is
         when 1 =>
            Ada.Text_IO.Put_Line("Shuffle");
         when 2 =>
            Ada.Text_IO.Put_Line("Pass");
         when 3 =>
            Skip_Line;
            Ada.Text_IO.Put_Line("Enter word: ");
            Ada.Text_IO.Get_Line(GuessWord, Last);
         when 4 =>
            Ada.Text_IO.Put_Line("See you again soon!");
            endGame := true;
         when others =>
            Ada.Text_IO.Put_Line("Invalid Option");


      end case;

           
           



         end;

          end loop;



end Main;


=====

OUTPUT

C:\Users\a0284014\Desktop\ada\exception\obj\main
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
e
1
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
3
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
e
Try a number from 1 to 4, Buddy
Enter word: 
e
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
r
t
Try a number from 1 to 4, Buddy
Enter word: 
r
 | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass 3)Enter Word 4)Exit 
r

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-18 14:08           ` Niklas Holsti
@ 2015-07-18 14:56             ` Björn Lundin
  0 siblings, 0 replies; 15+ messages in thread
From: Björn Lundin @ 2015-07-18 14:56 UTC (permalink / raw)


On 2015-07-18 16:08, Niklas Holsti wrote:
>> Seems like a compiler bug to me, but the behavior of *text_io.get
>> has surprised me before.
> 
> It is specified in the LRM that if the Get for Integer_IO encounters a
> character that cannot be part of the integer number, it stops at that
> point and does not "pass" that character. This means that one can read
> the integer 123 from the text "123ABC" and then read the string "ABC";
> the Get for the integer does not "consume" the "A".
> 
> If you want to "clear the buffer", you should call Skip_Line, also in
> the exception handler.

Ah, that is it.


-- 
--
Björn


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-18 14:32           ` Trish Cayetano
@ 2015-07-18 14:59             ` Björn Lundin
  2015-07-18 16:09             ` Dennis Lee Bieber
  1 sibling, 0 replies; 15+ messages in thread
From: Björn Lundin @ 2015-07-18 14:59 UTC (permalink / raw)


On 2015-07-18 16:32, Trish Cayetano wrote:
> On Saturday, July 18, 2015 at 9:55:12 PM UTC+8, björn lundin wrote:

This one works.
As Tero said - skip_line in exception handler does it.
But you ONLY need it there.

with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Numerics.Discrete_Random;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO.Unbounded_IO; use Ada.Text_IO.Unbounded_IO;
with Ada.IO_Exceptions; use Ada.IO_Exceptions;

procedure Main is
   GuessWord : String(1..20);
   last: Natural;
   option : Integer := 0;
   endGame: Boolean := False;
begin
    while not endGame loop
      begin
          Ada.Text_IO.Put_Line(" | CHOOSE YOUR OPTION: 1)Shuffle 2)Pass
3)Enter Word 4)Exit ");
          Ada.Integer_Text_IO.Get(option);
          case option is
             when 1 =>
                Ada.Text_IO.Put_Line("Shuffle");
             when 2 =>
                Ada.Text_IO.Put_Line("Pass");
             when 3 =>
                Skip_Line; -- needed ????
                Ada.Text_IO.Put_Line("Enter word: ");
                Ada.Text_IO.Get_Line(GuessWord, Last);
             when 4 =>
                Ada.Text_IO.Put_Line("See you again soon!");
                endGame := true;
             when others =>
                Ada.Text_IO.Put_Line("Invalid Option");
          end case;
	exception
	  when ADA.IO_EXCEPTIONS.Data_Error =>
	    Ada.Text_IO.Put_Line ("Try a number from 1 to 4, Buddy");
	    skip_line;
         end;
     end loop;
end Main;

--
Björn

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-18 14:32           ` Trish Cayetano
  2015-07-18 14:59             ` Björn Lundin
@ 2015-07-18 16:09             ` Dennis Lee Bieber
  2015-07-18 18:11               ` Niklas Holsti
  1 sibling, 1 reply; 15+ messages in thread
From: Dennis Lee Bieber @ 2015-07-18 16:09 UTC (permalink / raw)


On Sat, 18 Jul 2015 07:32:10 -0700 (PDT), Trish Cayetano
<trishacayetano@gmail.com> declaimed the following:

>
>Well which reminds me! I added a SKIP_LINE... The expected output is close... It shows the exception error every other input... it waits for 2 inputs and then 1 input and then 2... 
>
	The end of line is a non-numeric also for the integer get... So you
have to skip past that also...
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-18 16:09             ` Dennis Lee Bieber
@ 2015-07-18 18:11               ` Niklas Holsti
  2015-07-18 21:16                 ` Dennis Lee Bieber
  0 siblings, 1 reply; 15+ messages in thread
From: Niklas Holsti @ 2015-07-18 18:11 UTC (permalink / raw)


On 15-07-18 19:09 , Dennis Lee Bieber wrote:
> On Sat, 18 Jul 2015 07:32:10 -0700 (PDT), Trish Cayetano
> <trishacayetano@gmail.com> declaimed the following:
>
>>
>> Well which reminds me! I added a SKIP_LINE... The expected output is close... It shows the exception error every other input... it waits for 2 inputs and then 1 input and then 2...
>>
> 	The end of line is a non-numeric also for the integer get... So you
> have to skip past that also...

No, integer Get _starts_ by skipping leading blanks, line terminators, 
and page terminators. You can do a sequence of integer Gets without 
Skip_Lines in between.

See http://www.ada-auth.org/standards/12rm/html/RM-A-10-8.html.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Error "exception not permitted here" when putting EXCEPTION in a loop
  2015-07-18 18:11               ` Niklas Holsti
@ 2015-07-18 21:16                 ` Dennis Lee Bieber
  0 siblings, 0 replies; 15+ messages in thread
From: Dennis Lee Bieber @ 2015-07-18 21:16 UTC (permalink / raw)


On Sat, 18 Jul 2015 21:11:58 +0300, Niklas Holsti
<niklas.holsti@tidorum.invalid> declaimed the following:

>No, integer Get _starts_ by skipping leading blanks, line terminators, 
>and page terminators. You can do a sequence of integer Gets without 
>Skip_Lines in between.
>
>See http://www.ada-auth.org/standards/12rm/html/RM-A-10-8.html.

	Okay, teach me to check my documents first... I could have sworn there
was some situation (besides the original 999xxxx<EOL>) where it could get
held up at the <EOL>.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-07-18 21:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-17 15:47 Error "exception not permitted here" when putting EXCEPTION in a loop Trish Cayetano
2015-07-17 15:56 ` David Botton
2015-07-17 15:58 ` G.B.
2015-07-18  8:14   ` Trish Cayetano
2015-07-18 10:08     ` Björn Lundin
2015-07-18 12:41       ` Trish Cayetano
2015-07-18 13:56         ` Björn Lundin
2015-07-18 14:08           ` Niklas Holsti
2015-07-18 14:56             ` Björn Lundin
2015-07-18 14:32           ` Trish Cayetano
2015-07-18 14:59             ` Björn Lundin
2015-07-18 16:09             ` Dennis Lee Bieber
2015-07-18 18:11               ` Niklas Holsti
2015-07-18 21:16                 ` Dennis Lee Bieber
2015-07-17 16:02 ` Björn Lundin

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