Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!rpi!sarah!bingnews!vu2416 From: vu2416@bingvaxu.cc.binghamton.edu (vu2416) Newsgroups: comp.sys.cbm Subject: A better mousetrap (was RE: SEQ viewer...) Summary: It slices, it dices, but only in 128 mode Keywords: foo bar Message-ID: <1991Feb28.222244.20856@bingvaxu.cc.binghamton.edu> Date: 28 Feb 91 22:22:44 GMT Expires: never ever ever Organization: State University of New York at Binghamton Lines: 33 1. My sincere apologies for sending that last text viewer. Two bugs... the semicolon after the print statement and the error checking routine for the 64 (all that input#15 stuff) screwed everything up (it works fine if you use the line for 128 users, tho') 2. To make up for #1, here's a TESTED viewer/printer for the **128** that will break lines and pause in between pages. It was written for the 80 column mode... change the value of "pos(0)>70" to somewhere around 35 (line 130) and the 79 to 39 in line 140 for 40 columns. 10 rem a better 128 text view / printer - g.w. riedel 2/28/91 20 fast:trap 160:print chr$(14);"[S]creen or [P]rinter: "; 30 getkeyy$:if y$<>"s" and y$<>"p" then 30 40 close21:if y$="s" then open 21,3:else open 21,4,7 50 print "[";y$;"]":print:print "Filename: ";:open1,0:input#1,f$:close1:print 60 rem read--------------------- 70 open 5,8,4,"0:"+f$+",?,r":if left$(ds$,2)<>"00" then print "Disk error:";ds$:dclose:end 80 get#5,a$:if st=66thendclose:goto120 90 b$=b$+a$:if a$=" " or a$=chr$(13) then 120 100 goto80 110 rem line/page break?---------------------------- 120 if b$=chr$(13) then l=l+1 130 if l>17and pos(0)>70then print:print "PAUSED - PRESS ANY KEY.":l=0:getkeya$:print " ":print ""; 140 if pos(0)+len(b$)+1>79 then print:l=l+1:print b$;:else print b$; 150 b$="":goto 80 160 rem trap---------------------------------------- 170 if er<>30then resume 180 dclose:print:print "[BREAK]":end Gregg W. Riedel consp24@bingsuns.pod.binghamton.edu