comp.lang.ada
 help / color / mirror / Atom feed
* Re: Problem with SMG!!!!
       [not found] ` <3hvj11$pk6@theopolis.orl.mmc.com>
@ 1995-02-28  0:20   ` Adam Beneschan
  1995-02-28 18:21     ` Theodore E. Dennison
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Beneschan @ 1995-02-28  0:20 UTC (permalink / raw)


"Theodore E. Dennison" <dennison@escmail.mmc.orl.com> writes:
> amlombardi@vms4.sci.csupomona.edu wrote:
> >
> > I realize that my last post to this newsgroup was a little
> > misleading and confusing.. The problem I am having with SMG is
> > that after I CREATE the VIRTUAL KEYBOARD and wait for a keypress
> > and then get a keypress successfully... Output with the PUT
> > statement does not work...I was wondering how in ADA to use SMG to
> > correct this problem... Thanx in advance
> > 
> > 		By the way the commands are
> > 
> > 		CREATE_VIRTUAL_KEYBOARD(STATUS : COND_VALUE_TYPE;
> > 					KEYBOARD_ID : UNSIGNED_LONGWORD)
> > 
> > 		READ_KEYSTROKE(STATUS: COND_VALUE_TYPE;
> > 				KEYBOARD_ID : in UNSIGNED_LONGWORD;
> > 				KEY : out UNSIGNED_WORD); 
> 
> Unless I'm missing something, when you do screen I/O's with SMG, you
> need to do ALL your screen I/Os with SMG. In other words, you need to
> use the SMG output routines. Forget about Text_IO.
> 
> Of course, this means you will have to create a pasteboard, and all 
> that jazz. Read your VMS SMG manual for more details. 

Hmmm . . . I've been using SMG$ routines for keyboard input and the
regular SYS$QIOW routines for output, and I've never had a problem.
In other words, there seems to be nothing in VMS that requires that
you use SMG$ for output if you're using it for input.

VAX Ada may be a different story, however.  If TEXT_IO.PUT routines
simply mapped to SYS$QIOW, I doubt that you'd have a problem, based on
my experience.  However, VAX Ada's TEXT_IO routines might (1) result
in RMS$ routines being used for output, as opposed to SYS$QIOW, and/or
(2) do something special to handle multi-tasking that might screw
things up.  I don't know that much about VAX Ada, so I can't give you
any more ideas.  Sorry.

It does mean, however, that you may be able to solve your problems by
using SYS$QIOW directly, instead of TEXT_IO.  (Is there an interface
to this in STARLET or somewhere else?)  However, I personally think
it's ugly and would do it only if everything else that works is
uglier.

                                -- Adam



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

* Re: Problem with SMG!!!!
  1995-02-28  0:20   ` Problem with SMG!!!! Adam Beneschan
@ 1995-02-28 18:21     ` Theodore E. Dennison
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore E. Dennison @ 1995-02-28 18:21 UTC (permalink / raw)


adam@irvine.com (Adam Beneschan) wrote:
> "Theodore E. Dennison" <dennison@escmail.mmc.orl.com> writes:
> > Unless I'm missing something, when you do screen I/O's with SMG, you
> > need to do ALL your screen I/Os with SMG. In other words, you need to
> > use the SMG output routines. Forget about Text_IO.
> > 
> Hmmm . . . I've been using SMG$ routines for keyboard input and the
> regular SYS$QIOW routines for output, and I've never had a problem.
> In other words, there seems to be nothing in VMS that requires that
> you use SMG$ for output if you're using it for input.
> 
> VAX Ada may be a different story, however.  If TEXT_IO.PUT routines

If I remember correctly, TEXT_IO operations are mapped directly to
RMS$ routines, not to SYS$QIO routines. I also remember that mixing
Text_IO.Put* routines with SMG$ tended to cause problems. SMG$ 
provides its own text input and output routines, so why not use them?
If you "mix-and-match" your I/O routines, you are asking for trouble.

To put this in OO terms: Text_IO is an abstraction for user I/O. SMG 
is a different abstraction for user I/O. Pick one abstraction, and 
stick with it.

T.E.D.




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

end of thread, other threads:[~1995-02-28 18:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1995Feb15.190318.1@clstcs>
     [not found] ` <3hvj11$pk6@theopolis.orl.mmc.com>
1995-02-28  0:20   ` Problem with SMG!!!! Adam Beneschan
1995-02-28 18:21     ` Theodore E. Dennison

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