Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: perry@vu-vlsi.UUCP
Subject: Re: VMS Pascal Terminal I/O help needed
Date: Sun, 1-Mar-87 02:49:48 EST	[thread overview]
Message-ID: <638@vu-vlsi.UUCP> (raw)
In-Reply-To: 701@bgsuvax.UUCP

In article <701@bgsuvax.UUCP> denbeste@bgsuvax.UUCP (William C. DenBesten) writes:
>I am having difficulties writing what should be a simple program.  I want to
>read in a character at a time from the keyboard ...

Here is a sample program doing single character input from VAX/VMS Pascal,
see $help system  and look at sys$library:starlet.pas  for more info on the
wierd $assign and $qiow bs.  Unfortunately, I don't think there is any way
to get the io$ symbols directly into Pascal, I copied the values from
one of the FORSYSDEF modules...

...Rick			..{cbmvax,pyrnj,bpa}!vu-vlsi!perry
			perry@vuvaxcom.bitnet
---
[inherit('sys$library:starlet')]
program ascii(output);
var	c:char; chan: [word] 0..65535;
	code: integer := %x'3A' + %x'40'; { io$_ttyreadall + io$m_noecho }
begin
	$assign('tt',chan);
	open(output,'tt:'); rewrite(output);
	writeln('Enter  Q  or  q  to quit.');
	writeln('Start entering characters...');
	repeat
	 $qiow(,chan,code,,,,c,1);
	 writeln('Character=',c,'   ASCII code = ',ord(c):1)
	until (c='Q') or (c='q')
end.


      reply	other threads:[~1987-03-01  7:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1987-02-27 21:35 VMS Pascal Terminal I/O help needed denbeste
1987-03-01  7:49 ` perry [this message]
read-only archive

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