Page 1 of 1

MatchPattern() doesn't work ???

Posted: Sun Mar 06, 2011 2:46 pm
by gerograph
MatchPattern("test.jpg","*jpg") gives me "True" on Amiga OS4 but on windows it gives me a "FALSE" ????

Try this one below:

Code: Select all

Function p_chktype(dateiname$)
  DebugPrint(dateiname$)
  dateityp = False
  r = MatchPattern(dateiname$,"*.jpg")
  If r = True 
    dateityp = True
  EndIf
  r = MatchPattern(dateiname$,"*.jpeg")
  If r = True
    dateityp = True
  EndIf
  Return(dateityp)
EndFunction


DebugPrint("---Start---")
If p_chktype("test.jpg")
  DebugPrint("match....")
Else
  DebugPrint("no match....")
EndIf
WaitLeftMouse  

Re: MatchPattern() doesn't work ???

Posted: Tue Mar 08, 2011 5:51 pm
by airsoftsoftwair
MatchPattern() is currently only supported on AmigaOS & compatibles. This is because Windows & Mac OS use different pattern mechanisms. I still have to work out a cross platform pattern matching mechanism...