T.R | Title | User | Personal Name | Date | Lines |
---|
395.1 | setting up scrolling regions | TOLEDO::VENNER | | Tue Feb 03 1987 10:30 | 11 |
| there is a run time library routine called SCR$SET_SCROLL
which accepts two arguments, the starting and ending line
of the scroll region that you want. it expects the arguments
to be passed by immediate value.
if you're just using a VTXX terminal the actual escape sequence
is <ESC>[5;10r for example (scrolling region using lines 5 thru
10).
- marty
|
395.2 | No-need for No-scroll. | BISTRO::HEIN | If We don't Have it,You don't Need it! | Tue Feb 03 1987 14:14 | 22 |
| SCR$Mumbles are out of fashion. You are supposed to use SMG$More_Mumbles.
Anyway, setting up a scrolled region is most lickely to result in
scrolling within the region as oposed to the desired no scrolling.
The scrolling is caused by a (Carriage_Return) LineFeed output that
PASCAL generates, and should generate, after output with WRITELN...
IF the cursor is at the bottom of a scrolled region.
So the solution is to
- Avoid the (CR and) LF through other pascal output statements:
Write ? Carriage control? Put? I don't know
- Avoid being at the bottom line be including an 'cursor up'
escape sequence in the output line.
- This being the hackers file.... You could try puttin an
ESCAPE as last output character. If pascal outputs an LF
before the CR then that LF will be 'eaten' by the terminal
as part of the presumed escape sequence. This is my favourite
way of 'eating' the "?" at the end of a BASIC INPUT statement.
Hein.
|
395.3 | Or you could rewrite it in a high-level language like DCL | MAY13::MINOW | Martin Minow, MSD A/D, THUNDR::MINOW | Tue Feb 03 1987 16:13 | 14 |
| - This being the hackers file.... You could try puttin an
ESCAPE as last output character. If pascal outputs an LF
before the CR then that LF will be 'eaten' by the terminal
as part of the presumed escape sequence.
Say what? According to the escape sequence parsing spec, the LF
terminates the pending escape sequence, throwing it away. I.e.,
<ESC><LF> should be equivalent to just <LF>.
I kind of like the hackish solution of putting a cursor up at the end
of the line. It appeals to the cynic in me.
Martin.
|
395.4 | That annoying '?' | AMIGO::MULLEN | Dan Mullen | Tue Feb 03 1987 19:27 | 12 |
|
RE: .2
> - This being the hackers file.... You could try puttin an
> ESCAPE as last output character. If pascal outputs an LF
> before the CR then that LF will be 'eaten' by the terminal
> as part of the presumed escape sequence. This is my favourite
> way of 'eating' the "?" at the end of a BASIC INPUT statement.
FYI:
VAX BASIC has a SET NO PROMT ro enable/disable the question mark.
..Dan
|
395.5 | WRITELN needed for I/O | WHOARU::MCCARTHY | Just another colorful metaphor | Tue Feb 03 1987 22:23 | 11 |
| re: .2
Pascal does no terminal I/O until a WRITELN is issued. If you
do several writes, without a WRITELN, you will exceed some limit
(I forget which one...you get an error like "line to long....")
I would go for the SGM stuff. Lib$set_scroll still works (I
think) and that is what I used to use. You can set the scroll region
to one line ( can't you?) and then use ESC sequences to output into
other areas within the WRITELN.
mac (still a pascal hacker,,,,,BLISS who needs it !)
|
395.6 | | BISTRO::HEIN | If We don't Have it,You don't Need it! | Wed Feb 04 1987 04:21 | 26 |
| Re .3,
Thanks Martin for correcting me on that one. I blindly assumed
that as <ESC> "?" is 'eaten', so would all other invalid char-
acters ( more or less all but "[" ) dissappear. I had not
realized the the LF terminates the escape sequences. (I did
realize the CR might terminate the ESC, and I realized that
if that even if the CR goes away, then the LF will still cause
the scroll. So I wrote LF CR. But in reality most, or all,
languages really use <CR> <LF> in that order to terminate the
line)
Re .4,
The SET NO PROMPT is new with BASIC V3.0
Re .5,
I still maintain that the solution is to avoid the scroll, not
to turn it into something harmless. *Surely* there is some way
in PASCAL to avoid the CR LF at the end of the line. One way
seems to be to use the FORTRAN type CARRIAGE CONTROL attribute
for the file and put a "$" as first character on the line.
Other ways are including a relative or absolute cursor address
in the output line ( eg ESC [ A for up or ESC [ H for Home.
Hein.
|
395.7 | The pocket reference is mute on this topic | ANYWAY::GORDON | All I ever do is work & shovel snow! | Wed Feb 04 1987 09:00 | 11 |
| Well, when I read .0, I thought he was after the escape sequence
to set a VT240/241 to No Scroll, so I looked in my pocket reference.
Alas, the pocket reference only includes Jump Scroll and Smooth
Scroll, but not No Scroll.
If you set the scrolling region on the terminal to only line 24,
no scrolling will occur of the other 23 lines, but you lose the
24th line. Why don't you just use terminal QIO's to write to the
terminal with no carriage control?
--Doug
|
395.9 | nit | JON::MORONEY | Legalize Liberty | Wed Feb 04 1987 12:48 | 13 |
| re .2, .3, .6:
Control characters like <LF> and <CR> do not terminate an escape sequence,
rather they're interpreted immediately and then the escape sequence continues
to add characters as if the control character never existed. An exception to
this is another <ESC> character, which terminates the previous sequence without
action and starts a new one. If you don't believe this, try writing the
following to your terminal: (Use EXTR TT:)
a blank line follows this line
[
4munderlined text[m
-Mike
|
395.10 | SET PROMPT = BASIC 3.0 | FROST::HARRIMAN | Workin' in the Code Mines | Wed Feb 04 1987 13:55 | 7 |
| Re: Martin et al
SET PROMPT is only good on 3.0 BASIC.. For us poor slobs who
are "stuck" with 2.4 BASIC, I like Martin's hack... Of course, I
just got around all of that by using LIB$GET_INPUT....
/pjh
|
395.11 | Oh, yeah, BTW | FROST::HARRIMAN | Workin' in the Code Mines | Wed Feb 04 1987 14:05 | 16 |
| Oh yeah, I forgot about this too:
Try the following on any BASIC:
1 Open "TT:" for input as file #1%
Input #1%, "Foo: ";Bar$
Print bar$
End
Where's the "?" ?
/pjh
|
395.12 | | CAFEIN::PFAU | You can't get there from here | Wed Feb 04 1987 17:49 | 4 |
| There's always GET #0 - MOVE FROM #0. This does away with the '?'
but doesn't reprint a prompt on a ^R or ^U.
tom_p
|
395.13 | no need for this hack in C | PLDVAX::ZARLENGA | Bigger they are, Harder they hit | Tue Feb 10 1987 19:20 | 5 |
| We got around it by doing ^M, ESC, M. ^M to position cursor
at beginning of current line, ESCM to do reverse index (shorter
than cursor-up which is ESC[A by 1 character).
-mike zarlenga
|
395.14 | | CAFEIN::PFAU | You can't get there from here | Tue Feb 10 1987 21:14 | 7 |
| Shorter, yes, but with different affects (effects?). ESC M (reverse
index, RI) will cause the screen to scroll down if at the top line,
ESC [ A (cursor up, CUP) will not. If this doesn't make a difference
(if you know you won't be writing to the top line of the screen),
use RI.
tom_p
|
395.15 | Tip on hacking English :-) | ERIS::CALLAS | So many ratholes, so little time | Thu Feb 12 1987 17:05 | 4 |
| Effects. The way to tell the difference is that "effect" is a noun
and "affect" is a verb.
Jon
|
395.16 | ^X cancels escape sequence | DELNI::CANTOR | Dave C. | Sat Apr 11 1987 15:47 | 10 |
| Re .9
Another control character which terminates an escape sequence
without action is the cancel character (CAN, control-X), which
terminates the escape sequence and doesn't start a new one.
Another way of looking at, I guess, is that CAN terminates
a no-op escape sequence.
Dave C.
|
395.17 | I'm surprized | MDVAX3::COAR | A wretched hive of bugs and flamers. | Wed Dec 02 1987 13:09 | 8 |
| Tch, tch. Didn't anyone else read Stoney Ballard's DND sources?
If you want to avoid appending a <CR><LF> to your WRITELNs, use
the OPEN procedure with (something like) CARRIAGE_CONTROL := NONE.
Open SYS$OUTPUT as another file, and specify that file in the WRITEs
and WRITELNs when you are doing ReGIS. Omit it for normal text,
and the <CR><LF> will appended to the text.
#ken_who_thinks_everybody_missed_the_point :-)}
|