[comp.lang.ada] INFO-ADA Digest V90 #179

dell@SOL.NWC.NAVY.MIL (Dell Killian) (09/27/90)

>From @scfd.nwc.navy.mil:info-ada-request@wsmr-simtel20.army.mil Wed Sep 26
09:30:26 1990
Return-Path: <@scfd.nwc.navy.mil:info-ada-request@wsmr-simtel20.army.mil>
Received: from scfd.nwc.navy.mil by sol.nwc.navy.mil (4.1/SMI-4.0)
	id AA04351; Wed, 26 Sep 90 09:30:18 PDT
Received: from WSMR-SIMTEL20.ARMY.MIL by scfd.nwc.navy.mil with SMTP ;
	  Wed, 26 Sep 90 09:35:23 PDT
Date: Mon, 24 Sep 90 14:15:18 MDT
From: INFO-ADA-REQUEST@AJPO.SEI.CMU.EDU
Reply-To: INFO-ADA-REQUEST@AJPO.SEI.CMU.EDU
Message-Id: <900924141519.V90N179@WSMR-SIMTEL20.ARMY.MIL>
Status: R

To: INFO-ADA@AJPO.SEI.CMU.EDU, andrew, debi, mj, rkp, tom
Subject: INFO-ADA Digest V90 #179
>From @scfd.nwc.navy.mil:info-ada-request@wsmr-simtel20.army.mil Wed Sep 26
09:30:26 1990
Return-Path: <@scfd.nwc.navy.mil:info-ada-request@wsmr-simtel20.army.mil>
Received: from scfd.nwc.navy.mil by sol.nwc.navy.mil (4.1/SMI-4.0)
	id AA04351; Wed, 26 Sep 90 09:30:18 PDT
Received: from WSMR-SIMTEL20.ARMY.MIL by scfd.nwc.navy.mil with SMTP ;
	  Wed, 26 Sep 90 09:35:23 PDT
Date: Mon, 24 Sep 90 14:15:18 MDT
From: INFO-ADA-REQUEST@AJPO.SEI.CMU.EDU
Reply-To: INFO-ADA-REQUEST@AJPO.SEI.CMU.EDU
Message-Id: <900924141519.V90N179@WSMR-SIMTEL20.ARMY.MIL>
Status: R

INFO-ADA Digest             Mon, 24 Sep 90       Volume 90 : Issue  179

Today's Topics:
			Ada on IBM mainframes
			    Expanded names
				Help!
		       Keyboard input (2 msgs)
		   Keyboard input on IBM mainframes
----------------------------------------------------------------------

Date: 24 Sep 90 17:44:41 GMT
From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
Subject: Ada on IBM mainframes
Message-ID: <2173@sparko.gwu.edu>

In article <12790@encore.Encore.COM> jcallen@encore.Com (Jerry Callen) writes:
>
>P.S. There's a third "quite decent" Ada for IBM mainframes, from
Intermetrics.
>        I don't know if it is actually a product or not. I used to work
>        on it, so I can hardly provide an unbiased assessment. :-)

This compiler existed at one time; perhaps it still does. However, I cannot
find a reference to it in the June 1990 list of validated compilers, and that
list shows only IBM (via TeleSoft) and Alsys supporting IBM mainframes. I
guess Intermetrics let its validation lapse or something. Is that system
still being maintained? Anyone out there know?

---------------------------------------------------------------------------
Prof. Michael Feldman
Department of Electrical Engineering and Computer Science
The George Washington University
Washington, DC 20052
202-994-5253
mfeldman@seas.gwu.edu
---------------------------------------------------------------------------

------------------------------

Date: 24 Sep 1990 14:14:09-EDT
From: Marc.Graham@sei.cmu.edu
Subject: Expanded names
Message-ID: <9009241814.AA08734@bx.sei.cmu.edu>

The following Ada code compiles cleanly and produces the output
"Inner". Question: Is there any way that the outer outer_constant may
be named from the inner testnames? If no, then why is 4.1.3 rule f (in
particular, para 18 and 19) worded the way it is? (Note: if the outer
testnames were a procedure, rather than a package, the expanded name
testnames.outer_context is illegal within the inner testnames.)
------------------------------------------------------------
package testnames is
    procedure testnames (outer_constant : integer);
end testnames;
with text_io; use text_io;
package body testnames is

    outer_constant : constant := 3.14159;

    procedure testnames (outer_constant : integer) is
    begin
    if testnames.outer_constant > 2 then
	put_line("Outer!");
    else
	put_line("Inner");
    end if;
    end testnames;
end testnames;
with testnames;
procedure exectest is
begin
    testnames.testnames(1);
end exectest;
------------------------------------------------------------

Marc H. Graham                    Software Engineering Institute
marc@sei.cmu.edu                  Carnegie Mellon University
(412) 268 7784                    Pittsburgh, PA   15213


------------------------------

Date: Mon Sep 24 10:22:03 1990
From: kmccook@wrdis01.af.mil (Ken McCook;SCDQ;)
Subject: Help!
Message-ID: <9009241422.AA17160@wrdis01.af.mil>

I'm working on a MIS project to be hosted on PC using MS-DOS
and Ada. Have Alsys PC286 Ada Compiler.

Does anyone have experience on printed output to standard
government forms.

I'd prefer to write directly to the printer, but I could live
with having to write to a file and then printing the file.

I had hoped that Ada's Text_IO would have the capabilities
Turbo Pascal has for directing output directly to the printer
using Write and WriteLn? (And I'd hoped for direct keyboard
reading as well like someone else on the net in recent days.
Something like Turbo's "Read (kbd, X);".)

I am desperate for examples of source code and some expert
advice on this oneand would greatly appreciate any help.

Thanks,

Ken McCook     Computer Programmer     Warner Robins Air Logistics Center
kmccook@wrdis01.af.mil        (912) 926-7709         (DSN) 468-7709

------------------------------

Date: 24 Sep 90 13:58:09 GMT
From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
Subject: Keyboard input
Message-ID: <2172@sparko.gwu.edu>

In article <3808@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A.
O'Keefe) writes:
>[about single-keystroke input]
>
>I would like to know how such a package could be implemented under CMS
>or TSO.  (Any "power of 2" fan know what CANDE will let you do these days?)
>IBM's operating systems really don't believe in character transput to
>terminals.  Perhaps IBM _ought_ to be ignored, but _could_ it have been?
>
My impression (from only limited experience with CMS) is that single-character
I/O is difficult at best under CMS because the CMS device drivers (or "access
methods" in IBM parlance) assume non-scrolling terminals and line-oriented
input (hence the MORE...) message at the bottom of every screen. This is not
an Ada problem, rather an OS one. In fact, I tried using an _ASCII_ terminal
driver (provided, I think, for interactive APL users among others). Using
Text_IO to send escape sequences to the terminal, so that I could control
my own _output_ formatting, failed: the driver was willing to give up on the
MORE... dialog, but it mapped my nonprintable ASCII characters to blanks,
so the terminal-control sequences were ignored.

I conjecture that a sufficiently adept assembler programmer could figure out
how to end-run the CMS device drivers and then write an interface package
to make it Ada-callable, but I don't think it would be easy.

Given the differences between ASCII and EBCDIC character sets, I find it
amazing that a decent Ada could have been implemented at all on IBM mainframe
iron. There are in fact at least two quite decent systems out there, one
sold by Alsys, the other by IBM, supported, I believe, out of Toronto.

I take it you are using the IBM Ada "program product" for Ada on CMS. If so,
the system is really a TeleSoft product (I am not revealing any secrets here).
Anyone at TeleSoft know whether this sort of thing has been done?
---------------------------------------------------------------------------
Prof. Michael Feldman
Department of Electrical Engineering and Computer Science
The George Washington University
Washington, DC 20052
202-994-5253
mfeldman@seas.gwu.edu
---------------------------------------------------------------------------

------------------------------

Date: 24 Sep 90 15:00:00 EDT
From: "EDWARD CRAGG" <ecragg@gmuvax.gmu.edu>
Subject: Keyboard input
Message-ID: <9009241905.AA13463@ajpo.sei.cmu.edu>

> From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
> Subject: Keyboard input
>
   [ text deleted ]

> I would like very much to see a portable character-IO library -
> portable in the sense that there would be an implementation-independent
> package spec. The routine described by Rick Conn in a previous posting is
> a good start in this direction. I will see if I have a copy and post it.
> The package _body_ will necessarily be OS-dependent, because it's something
> that can't be directly written in Ada.

The ALS/N project has taken the approach of writing a package
IMMEDIATE_IO (using VMS QIOW's) which is effectively a TEXT_IO clone
for all the objects for which it makes sense.  (All the various
column/line/page related objects are eliminated).  As a result, it is
interchangeable with TEXT_IO (assuming WITHs and USEs) and does not
require a "thought pattern" change when writing code. When live
keyboard input is required, IMMEDIATE_IO is used, otherwise TEXT_IO is
used.  I have found the package to be very practical and effective.

ed
 ............................................................
Edward E Cragg                Bitnet:   ECRAGG@GMUVAX
			      Internet: ECRAGG@GMUVAX.GMU.EDU



------------------------------

Date: 24 Sep 90 16:27:17 GMT
From: encore!jcallen@husc6.harvard.edu  (Jerry Callen)
Subject: Keyboard input on IBM mainframes
Message-ID: <12790@encore.Encore.COM>

In article <2172@sparko.gwu.edu> mfeldman@seas.gwu.edu () writes:
> [various stuff about the difficulties of doing character I/O
>  on IBM 370 mainframes]
>I conjecture that a sufficiently adept assembler programmer could figure out
>how to end-run the CMS device drivers and then write an interface package
>to make it Ada-callable, but I don't think it would be easy.

IBM terminal I/O is fundamentally half-duplex. There is possibly a kluge you
could pull on 3270s using "trigger fields" to get data a character at a
time but the overhead would be unspeakable. Unless you are willing to
use somewhat non-standard hardware or hack the OS (ha!) it is just not
possible to do "raw mode" I/O on IBM 370 mainframes. Amdahl's UTS
(Unix for 370s) can do this with special software in the mainframe and
in the terminal controller, but for CMS and TSO it is for all intents
and purposes impossible.

>Given the differences between ASCII and EBCDIC character sets, I find it
>amazing that a decent Ada could have been implemented at all on IBM mainframe
>iron. There are in fact at least two quite decent systems out there, one
>sold by Alsys, the other by IBM, supported, I believe, out of Toronto.

Actually, it's not very hard; you just have to translate everying coming in
and going out. Bits is bits is bits...

-- Jerry Callen
   jcallen@encore.com

P.S. There's a third "quite decent" Ada for IBM mainframes, from Intermetrics.
	 I don't know if it is actually a product or not. I used to work
	 on it, so I can hardly provide an unbiased assessment. :-)

------------------------------

End of INFO-ADA Digest V90 Issue #179
*************************************


----- End Included Message -----


Thanks,

Dell Killian
Code 3922
Naval Weapons Center
China Lake, CA. 93555
E-mail: killian@nwc.navy.mil


----- End Included Message -----

Thanks,

Dell Killian
Code 3922
Naval Weapons Center
China Lake, CA. 93555
E-mail: killian@nwc.navy.mil

mfeldman@seas.gwu.edu (Michael Feldman) (09/29/90)

I'm wondering why this INFO-ADA digest was posted, since I think all
comp.lang.ada and INFO-ADA messages get cross-posted anyway. Posting the
digests from the other side of the net world is redundant, isn't it?

Mike Feldman