comp.lang.ada
 help / color / mirror / Atom feed
* Help with an errant 'IF' statement please.
@ 2014-11-29 13:28 Austin Obyrne
  2014-11-29 14:03 ` gautier_niouzes
  2014-11-29 14:08 ` Simon Clubley
  0 siblings, 2 replies; 19+ messages in thread
From: Austin Obyrne @ 2014-11-29 13:28 UTC (permalink / raw)


A subset of a larger program is shown below.

This is an IF statement that just won't work and the same has happened in the past on other occasions in this very same program alone while working ok in other parts of the same program further on as well as being ok in other loops. 

It works fine also in other programs in different loops but for some unknown (to me) reason it just won't work here in this loop on this occasion.

I have tried everything to no avail.

Maybe there is some basic syntax that I am contravening in this type of Loop.

Your usual help would be greatly appreciated.

The 'GET' function is intended to stall the run of the loop for viewing of the data.

(Start looking here Please:)

Line_Number : Integer;  

Sentinel : CONSTANT Character:= '~';

Line_Number:= 0;
  
LOOP
  EXIT WHEN NextChar = Sentinel;
  Line_Number:= Line_Number+1;
  Ada.Text_IO.New_Line(1);
  Ada.Text_IO.Put(Item => "                          - Character number ");
  Ada.Integer_Text_IO.Put(Item => Line_Number, Width => 1);
  Ada.Text_IO.New_Line(1);
   
 
    IF Total REM 12 = 0 THEN
      Ada.Text_IO.New_Line(1);
      Ada.Text_IO.Put(Item => "                       ");
      Ada.Text_IO.Put(Item => " # - press any key/return to continue > ");
      Ada.Text_IO.Get(Item => View);
    END IF;

  Ada.Text_IO.New_Line;
  Ada.Text_IO.Put(Item => "  ----------------------------------------------------------------");
  END LOOP;
  ?

Austin O' Byrne - aka adacrypt. 

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

end of thread, other threads:[~2014-12-02  2:57 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-29 13:28 Help with an errant 'IF' statement please Austin Obyrne
2014-11-29 14:03 ` gautier_niouzes
2014-11-29 15:05   ` Austin Obyrne
2014-11-29 15:45     ` Simon Clubley
2014-11-29 16:10       ` Austin Obyrne
2014-11-29 16:54     ` Dennis Lee Bieber
2014-11-30  2:16       ` Austin Obyrne
2014-11-30 11:18         ` Simon Clubley
2014-11-30 12:58           ` Austin Obyrne
2014-11-30 13:01             ` Austin Obyrne
2014-12-01 22:20               ` Stephen Leake
2014-12-02  2:57                 ` Austin Obyrne
2014-11-30 13:46             ` Simon Clubley
2014-11-30 14:49               ` Austin Obyrne
2014-11-30 15:43                 ` Simon Clubley
2014-11-30 19:23                 ` Shark8
2014-11-30 11:56         ` Denis McMahon
2014-11-30 12:19           ` Austin Obyrne
2014-11-29 14:08 ` Simon Clubley

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