Artifact 2764d248c1982b45b2e3dd7e91b1d85a01617ee51a0ae2b6abb64dc91a524b70:
- File
psl-1983/emode/win-demo.red
— part of check-in
[eb17ceb7f6]
at
2020-04-21 19:40:01
on branch master
— Add Reduce 3.0 to the historical section of the archive, and some more
files relating to version sof PSL from the early 1980s. Thanks are due to
Paul McJones and Nelson Beebe for these, as well as to all the original
authors.git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/historical@5328 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1973) [annotate] [blame] [check-ins using] [more...]
procedure BufferNames; Mapcar(WindowList,'cdar); BufferNames(); procedure FindWindowName N; FindWindowField('WindowsBufferName,N); procedure FindWindowField(F,N); begin scalar x; x:=WindowList; l: if null x then return NIL; if Cdr atsoc(F,car x) eq N then return car x; x:=cdr x; goto l end; procedure SelectName N; Begin scalar x; x:=FindWindowName N; SelectWindow x; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Following stuff is used to set up a BREAK window << % Create the BREAK buffer BreakBuffer:=CreateBuffer('!B!r!e!a!k, eval DefaultMode); % Create the window to look into the buffer. BreakWindow := FramedWindowDescriptor('!B!r!e!a!k, % Starts at column 50, Near top of screen Coords(50,1), % Dimensions are roughly 29 by 10? Coords(28,9)); % Set up the buffer text. SelectBuffer '!B!r!e!a!k; !$CRLF(); Insert_string("q % To quit"); !$CRLF(); Insert_string("t % To traceback"); !$CRLF(); Insert_string("i % Trace interpreted stuff"); !$CRLF(); Insert_string("r % Retry"); !$CRLF(); Insert_string("c %Continue,"); !$CRLF(); Insert_string(" %using last value"); !$CRLF(); DeselectBuffer '!B!r!e!a!k; CopyD('Oldbreak,'Break); Flag('(Break),'User); >>; procedure Break; Begin Scalar W; W:=CurrentWindowdescriptor; SelectWindow BreakWindow$ !$BeginningOfBuffer(); % Place point at start of buffer. % Transfer control to the original break handler. Catch(NIL, OldBreak() ); % When finished, "pop" our screen off of the physical screen. DeselectScreen CurrentVirtualScreen; SelectWindow W; % Back to the window we originally had. % If !*QuitBreak then StdError "exit"; % ???? end; car 1; % Execute this to test the system.