Quickscan Mod GBBS

Brd -> ACOS PROGRAMMING
Numb -> 98 of 100
Sub -> QUICKSCAN MOD OF THIS SYSTEM
To -> All
From -> MAURICE BERNSTEIN, SYSOP
Date -> 04/17/88 00:15:38

;QUICKSCAN MODIFIED FOR DATE SCANNING
;BY Maurice Bernstein, M.D. for the AVCC Bulletin Board, 1988
;BASED ON A ROUTINE BY RANDY RYAN
start
on nocar goto link.term
gosub idinf
if bf$=”” print \”That board is down right now.”:return
if not b1 print \”You do not have access to that board.”:return
if i$=”Q” gosub qscan
qf=0:qx=0
;qf=1 is flag that indicates the user is in quickscan mode.
;qx holds the original flag value if the qf flag is changed.
;Here both flags are set to 0 on return from quickscan.
; ……….

; global quickscan

qscan
qf=1:qx=qf
on nocar goto link.term
ob=bb:bb=1
print \”Global Quickscan…Spacebar Exits”
print \”Retrieve Bulletins Starting at What Date”
print “At or After the Date Last Called?”print “[Return] to accept or type mm/dd/yy format “lc$;
print chr$(8,8);:input @2 i$
if len(i$)<>8 then sd$=lc$
if mid$(i$,3,1)<>”/” or mid$(i$,6,1)<>”/” or val(i$)=0 then sd$=lc$
if i$=”” or val(mid$(i$,4,2))=0 or val(mid$(i$,7,2))=0then sd$=lc$
lx$=mid$(lc$,7,2)+mid$(lc$,1,2)+mid$(lc$,4,2)
sx$=mid$(sd$,7,2)+mid$(sd$,1,2)+mid$(sd$,4,2)
if sx$<lx$ then sx$=lx$

; ………….

qs2.2
x=(clock(2)-clock(1))/60:x$=right$(“0″+str$(x),2)
if x=0 x$=”–“:else if info(5) x$=”::”
print \bn$
printa1$”, press P to <P>ost.
print \”[“x$”] P,F,K,Q,R,S,[C]ontinue? :”;
input @2 “[C] ” i$
if left$(i$,1)=”F” then qf=0:gosub fwd:qf=qx:goto qs2.2
if left$(i$,1)=”R” then qf=0:gosub rvs:qf=qx:goto qs2.2
if i$=”P” sb$=””:ti$=””: gosub post:goto qs2.2
if i$=”Q”then qf=0:qx=0:pop:return
if i$=”C” i$=”Y”:goto qs3
if i$=”S” then qf=0:gosub scan:qf=qx:goto qs2.2
if i$=”K” gosub kill:goto qs2.2
if i$=”” i$=”Y”:goto qs3

; ……………

show1
if flag(36) goto anony
if qf=0 then input #msg(a),sb$\tn,ti$\d,fr$:setint(2):goto pr.head
input #msg(a),sb$\tn,ti$\d,fr$\dt$:setint(2)
; [DATE STRING dx$ IS BASED ON A BULLETIN DATE STAMP WITH 2 SPACES
; BETWEEN THE ARROW AND THE FIRST CHARACTER OF THE DATE IN THE
; STRING dt$. IF THERE IS NO SPACE THEN
; dx$=mid$(dt$,14,2)+mid$(dt$,8,2)+mid$(dt$,11,2) ]

dx$=mid$(dt$,16,2)+mid$(dt$,10,2)+mid$(dt$,13,2)
if sx$>dx$ then return
pr.head
print #x,\” Brd -> “bn$\”Numb -> “a” of “msg(0)\” Sub -> “sb$
print #x,” To -> “ti$
print #x,”From -> “fr$
if qf=1 then print #x,dt$

show2
; ……..
if i$=”Q” then qf=0:qx=0: pop:return
; ……..
*******************************************************************************
In the code above, I compared dates as date strings lx$, sx$, dx$. These strings are in a format: yymmdd thus when comparing dates from one year to the next a correct comparison will be made, where as in the format mmddyy the later date would be read erroneously as the earlier date. ..Maurice.
*******************************************************************************

[B13 #98 of 100] ? or Cmd [N]#

Leave a Reply

Your email address will not be published. Required fields are marked *