r/qb64 • u/xenos233 • Jan 03 '24
Problem replacing DIR$ statement with _FILES$
OLD CODE IN MICROSOFT BASIC VERSION 7 THAT WORKED
templ$ = arxf$ + ".lim"
Filenum1% = 0
X$ = DIR$(templ$)
IF LEN(X$) = 0 THEN ' check if the filetype is right
Filenum1% = 0
FileNum% = FileNum% + Filenum1%
ELSE
Filenum1% = 1
FileNum% = FileNum% + Filenum1%
f$(Filenum1%) = X$
DO WHILE LEN(DIR$) > 0
Filenum1% = Filenum1% + 1
FileNum% = FileNum% + Filenum1%
f$(FileNum%) = DIR$
LOOP
END IF
NEW QB64 CODE TRING TO REPLACE DIR$ WITH _FILES$
templ$ = arxf$ + ".lim"
Filenum1% = 0
X$ = _FILES$(templ$) ' ERROR HERE
If Len(X$) = 0 Then ' check if the filetype is right
Filenum1% = 0
FileNum% = FileNum% + Filenum1%
Else
Filenum1% = 1
FileNum% = FileNum% + Filenum1%
f$(Filenum1%) = X$
Do While Len(_FILES$) > 0 ' ERROR HERE
Filenum1% = Filenum1% + 1
FileNum% = FileNum% + Filenum1%
f$(FileNum%) = DIR$
Loop
End If
I WOULD APPRECIATE ANY HELP THAT YOU COULD PROVIDE
View all comments
Show parent comment
1
u/sneakpeekbot Jan 04 '24
Here's a sneak peek of /r/QB64pe using the top posts of all time!
#1: QB64 v3.11.0 Released
#2: Epos created in qb64pe | 2 comments
#3: https://github.com/QB64-Phoenix-Edition/QB64pe/releases/tag/v3.10.0
I'm a bot, beep boop | Downvote to remove | Contact | Info | Opt-out | GitHub