[SOLVED] <> and =0 filtering broken
Posted: Tue Sep 24, 2024 9:36 pm
I get a file listing and try to filter out all ".LOG" files but cannot so I am highly inclined to report this as a pair of bugs.
Either way I get same inaccurate results. So . . . What am I doing wrong???
Code: Select all
;Simulate list of filenames and exclude all "LOG" files.
Debug "Begin by excluding all files that contain 'LOG'"
For n = 1 To 30
x = Random(4294967295,1)
If Random(1,0)
If Random(1,0)
s$ = Hex(x) + ".PDF"
Else
s$ = Hex(x) + ".LOG"
EndIf
Else
If Random(1,0)
s$ = Hex(x) + ".PDF"
Else
s$ = Hex(x) + ".ARC"
EndIf
EndIf
;DO NOT list files that have "log" in name!!!
If FindString(check$,"log",#PB_String_NoCase) = 0
Debug s$
EndIf
Next n
Debug "Try again by checking last 3 characters"
For n = 1 To 30
x = Random(4294967295,1)
If Random(1,0)
If Random(1,0)
s$ = Hex(x) + ".PDF"
Else
s$ = Hex(x) + ".LOG"
EndIf
Else
If Random(1,0)
s$ = Hex(x) + ".PDF"
Else
s$ = Hex(x) + ".ARC"
EndIf
EndIf
;DO NOT list files that end with "log" in name!!!
If LCase(right(check$,3)) <> "log"
Debug s$
EndIf
Next n