TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: JAMES GOLDBLOOM
from: JOHN HEWETT
date: 1995-07-17 21:16:00
subject: DIR$ potential problem?

*** Quoting James Goldbloom to All dated 07-16-95 ***
> ON ERROR GOTO TRAP5
>  count=1
>  chdir netmail2$
>  a$=dir$ ("*.MSG"):if a$="" then count=0:goto DIRTMP
>  nm$(1)=a$
>  do until a$="" or count=8000
>   a$=dir$
>   if a$"" then count=count+1:nm$(count)=a$
>  loop
Hmmmm... That should work ok. Another approach comes to mind too:
-------------------------------------------------------
ON ERROR GOTO DUMMYTRAP
COUNT=0
CHDIR NETMAIL2$
GOTO BYPASS
DUMMYTRAP:
RESUME GETMSGS
BYPASS:
DO UNTIL COUNT=8000
  GETMSGS:
  INCR COUNT
  A$=MID$(STR$(COUNT),2)+".MSG"
  OPEN A$ FOR INPUT AS #1
  CLOSE#1
  INCR MSGNUMBER
  NM$(MSGNUMBER)=A$
LOOP
-------------------------------------------------------
This way is sloppy, uses GOTO's more than I like, and abuses that
poor ON ERROR statement, but at least it works! 
--- Why settle for less?
---------------
* Origin: The Blue Light Special 810-542-6619 Ferndale, MI (1:2202/6969)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.