Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-10

Problem with GLOB()

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Rainer Hantsch

Hello!

I just wrote a little program in FPC 2.0.2 which uses GLOB() to search and display a directory. I use 'oldlinux' in the uses statement.

It works fine on my old SuSE 8.0.

Then I copied the binary to a SuSE 9.0 machine and started it there. It works (means that it doesn't crash), but shows no files when I use a search mask with a directory, i.e. './work/*' instead of '*'. But is has no LinuxError, oit only finds nothing.

First I thought this is caused by copying a binary to a different system, so I finally installed the full (and same!) fpc version there and re-compiled the source, but the result is the same.

Any idea about what is wrong here?

mfg

Ing. Rainer Hantsch

Marco van de Voort
to Rainer Hantsch
I just wrote a little program in FPC 2.0.2 which uses GLOB() to search and display a directory. I use 'oldlinux' in the uses statement.

[...]

finally installed the full (and same!) fpc version there and re-compiled the source, but the result is the same. Any idea about what is wrong here?

Uhh, making NEW code based on OLDlinux :-)

Glob is dead, and with a reason. It used to be faster, but that kind of functionality has been added to the normal findfirst/findnext routines a while ago. (e.g. the FreeBSD port already has it pre 1.0, and the Linux port since 2.0 afaik)