comp.lang.ada
 help / color / mirror / Atom feed
From: Austin Obyrne <austin.obyrne@hotmail.com>
Subject: Help with an errant 'IF' statement please.
Date: Sat, 29 Nov 2014 05:28:39 -0800 (PST)
Date: 2014-11-29T05:28:39-08:00	[thread overview]
Message-ID: <af35fb37-1471-424c-aff3-322886b32774@googlegroups.com> (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. 

             reply	other threads:[~2014-11-29 13:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-29 13:28 Austin Obyrne [this message]
2014-11-29 14:03 ` Help with an errant 'IF' statement please 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
replies disabled

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