Re: [fpc-pascal] findfirst wildcards...

2014-12-04 Thread Bart
On 12/3/14, waldo kitty wkitt...@windstream.net wrote: On 12/3/2014 5:09 PM, Bart wrote: Windows.FindFirstFile however treats ? as exactly 1 character AFAIK. And is I'm not mistake this was also the case with TP in the old days. Seems I was mistaken. Sorry for the confusion. FF with mask

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread Jonas Maebe
On 03 Dec 2014, at 06:05, waldo kitty wrote: can you help me understand the differences in the output of the below program? given these three filenames: t.txt t1.txt t11.txt with mask t?.txt why does MatchesMaskList not show t.txt and t11.txt like plain findfirst? ? means a single

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread Graeme Geldenhuys
On Tue, 2 Dec 2014, waldo kitty wrote: how do you process for multiple filemasks? eg: find ts??.sel and t???.sel for the same processing run I don't think FindFirst and FindNext has that capability. I would use the AllMasks constant and then manually match using a simple regex that

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread Graeme Geldenhuys
On Wed, 3 Dec 2014, Michael Van Canneyt wrote: They do. Wow. We are never to old to learn. :-) I'll have to take a closer look at that functionality. Regards, Graeme This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread Tomas Hajny
On Wed, December 3, 2014 06:05, waldo kitty wrote: On 12/2/2014 5:12 PM, Bart wrote: On 12/2/14, waldo kitty wkitt...@windstream.net wrote: how do you process for multiple filemasks? eg: find ts??.sel and t???.sel for the same processing run Maybe I misunderstand the question but: Use

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread waldo kitty
On 12/3/2014 3:41 AM, Jonas Maebe wrote: On 03 Dec 2014, at 06:05, waldo kitty wrote: can you help me understand the differences in the output of the below program? given these three filenames: t.txt t1.txt t11.txt with mask t?.txt why does MatchesMaskList not show t.txt and t11.txt like

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread waldo kitty
On 12/3/2014 6:16 AM, Tomas Hajny wrote: Given the fact that OS/2 appeared in your listing, I can clarify the difference. It comes from the fact that in case of FindFirst/FindNext, the interpretation of wildcards is performed by the underlying operating system whereas the routine mentioned by

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread Ralf Quint
On 12/3/2014 8:30 AM, waldo kitty wrote: On 12/3/2014 3:41 AM, Jonas Maebe wrote: On 03 Dec 2014, at 06:05, waldo kitty wrote: can you help me understand the differences in the output of the below program? given these three filenames: t.txt t1.txt t11.txt with mask t?.txt why does

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread Bart
On 12/3/14, Ralf Quint freedos...@gmail.com wrote: On any DOS based OS (that includes OS/2 and Windows), the ? wildcard character will find any character, including no character at all in that position. So in your example, t?.txt will find t.txt and tx.txt but not txy.txt. It will not return

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread Ralf Quint
On 12/3/2014 12:27 PM, Bart wrote: On 12/3/14, Ralf Quint freedos...@gmail.com wrote: On any DOS based OS (that includes OS/2 and Windows), the ? wildcard character will find any character, including no character at all in that position. So in your example, t?.txt will find t.txt and tx.txt

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread Bart
On 12/3/14, Ralf Quint freedos...@gmail.com wrote: On 12/3/2014 12:27 PM, Bart wrote: Windows.FindFirstFile however treats ? as exactly 1 character AFAIK. And is I'm not mistake this was also the case with TP in the old days. A quick test in a Windows 8.1 command prompt: I don't dispute

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread waldo kitty
On 12/3/2014 3:02 PM, Ralf Quint wrote: On 12/3/2014 8:30 AM, waldo kitty wrote: yes, i wrote t11.txt when i should have written t1.txt... my bad... however on OS/2 native OS/2 with 4OS2 command interpreter replacement OS/2 DOS native OS/2 DOS with 4DOS command interpreter replacement

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread waldo kitty
On 12/3/2014 3:27 PM, Bart wrote: On 12/3/14, Ralf Quint freedos...@gmail.com wrote: On any DOS based OS (that includes OS/2 and Windows), the ? wildcard character will find any character, including no character at all in that position. So in your example, t?.txt will find t.txt and tx.txt but

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread waldo kitty
On 12/3/2014 5:09 PM, Bart wrote: On 12/3/14, Ralf Quint freedos...@gmail.com wrote: On 12/3/2014 12:27 PM, Bart wrote: Windows.FindFirstFile however treats ? as exactly 1 character AFAIK. And is I'm not mistake this was also the case with TP in the old days. A quick test in a Windows

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread Tomas Hajny
On Wed, December 3, 2014 23:18, waldo kitty wrote: . . desirable in some cases... i just have to test it on OS/2 and see if i can compile it... i can't do that with MatchesMaskList because the unit that contains it is not available on OS/2... Which unit is it, btw? Have you tried compiling

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread Ralf Quint
On 12/3/2014 2:09 PM, Bart wrote: I don't dispute teh way cmd/command treats ? in dir, I merely stated that the OS function FindFirstFile des not do it like that. (And so we should not change FindFirst/FidNext behaviour.) Well, I have no way/time to do a more extensive test right now, but I am

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread waldo kitty
On 12/3/2014 5:48 PM, Tomas Hajny wrote: On Wed, December 3, 2014 23:18, waldo kitty wrote: . . desirable in some cases... i just have to test it on OS/2 and see if i can compile it... i can't do that with MatchesMaskList because the unit that contains it is not available on OS/2... Which

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread waldo kitty
On 12/3/2014 8:10 PM, waldo kitty wrote: MatchesMaskList and its friends are in the Lazarus MASKS unit... since lazarus is not available for OS/2, i'm not looking for it to happen... then there's the difference in the way it operates compared to what is expected... not the way it operates...

Re: [fpc-pascal] findfirst wildcards...

2014-12-03 Thread Sven Barth
On 03.12.2014 23:09, Bart wrote: On 12/3/14, Ralf Quint freedos...@gmail.com wrote: On 12/3/2014 12:27 PM, Bart wrote: Windows.FindFirstFile however treats ? as exactly 1 character AFAIK. And is I'm not mistake this was also the case with TP in the old days. A quick test in a Windows

Re: [fpc-pascal] findfirst wildcards...

2014-12-02 Thread Bart
On 12/2/14, waldo kitty wkitt...@windstream.net wrote: how do you process for multiple filemasks? eg: find ts??.sel and t???.sel for the same processing run Maybe I misunderstand the question but: Use '*' as mask for FindFirst/FindNext then use MatchesMaskList()? Bart

Re: [fpc-pascal] findfirst wildcards...

2014-12-02 Thread waldo kitty
On 12/2/2014 5:12 PM, Bart wrote: On 12/2/14, waldo kitty wkitt...@windstream.net wrote: how do you process for multiple filemasks? eg: find ts??.sel and t???.sel for the same processing run Maybe I misunderstand the question but: Use '*' as mask for FindFirst/FindNext then use

Re: [fpc-pascal] findfirst wildcards...

2014-12-02 Thread waldo kitty
On 12/2/2014 5:12 PM, Bart wrote: On 12/2/14, waldo kitty wkitt...@windstream.net wrote: how do you process for multiple filemasks? eg: find ts??.sel and t???.sel for the same processing run Maybe I misunderstand the question but: Use '*' as mask for FindFirst/FindNext then use

Re: [fpc-pascal] findfirst wildcards...

2014-12-02 Thread waldo kitty
On 12/2/2014 5:12 PM, Bart wrote: On 12/2/14, waldo kitty wkitt...@windstream.net wrote: how do you process for multiple filemasks? eg: find ts??.sel and t???.sel for the same processing run Maybe I misunderstand the question but: Use '*' as mask for FindFirst/FindNext then use