Hi everyone,
I'm hoping someone can tell me what I'm doing wrong with this PortableE code. When I compile it, I get an error:
ERROR: parameter of incorrect type
LINE 19: IF InStr(file,'.lha') <> -1
Hint: parameter has type ARRAY OF CHAR, expression has type VALUE.
I'm guessing its some kind of type error, but I don't know what it should be.
/* Scan Dir*/
OPT POINTER, PREPROCESS
MODULE 'std/cGui', 'std/cPath'
DEF dir:STRING
DEF file:ARRAY OF CHAR
DEF info:ARRAY OF CHAR
PROC main()
dir := ImportDirPath('Misc:Downloads/DLM_Archive')
RecurseDir(dir,ProcessFile)
ENDPROC
FUNC ProcessFile(file) OF funcRecurseFile
Print('Found File: \s\n',file)
IF InStr(file,'.lha') <> -1
Print('Is an lha.\n')
ENDIF
ENDFUNC
Thanks for any help.