[fpc-pascal] Weird DosError values

xhajt03 at vol.cz xhajt03 at vol.cz
Thu Feb 19 15:52:54 CET 2004


From:        "Matthews" <dematthews at uwaterloo.ca>
To:          fpc-pascal at lists.freepascal.org
Subject:     Re: [fpc-pascal] Weird DosError values
Date sent:   Wed, 18 Feb 2004 16:13:23 -0500


Hi Lukas

> I'm running Win 2000, and using sysutils, and dos -
> could that be the problem?

Yes, that is the problem. You have to make sure that either
you're using that FindFirst from unit Dos (e.g. by calling it
using "Dos.FindFirst", "Dos.FindNext" and "Dos.FindClose"), or
change the way of checking for errors (SysUtils doesn't use
DosError).


> However, I downloaded the 1.9.2 w32 version of
> FreePascal, and the program 
> compiled fine, and hasn't given me any errors since (no
> odd DosError 
> values).

I would guess that the reason why it works now is that you might
have changed the order of units in your "uses" clause. You
shouldn't rely on this, and make the selection explicit.


> One question:  In the future, should I just host my
> code on geocities (or 
> something) and then include a link to it instead?

It depends. The best solution is to shrink problematic code to
the shortest needed amount (i.e. something which still compiles
and shows the problem at the same time). In this case you can
still place it inline in your message. If you cannot do that and
the code is larger than something like 20-30 lines but below
something like 2-3 kB, you can add it as an attachment to your
message. If it's larger then placing it somewhere at WWW or FTP
and just sending the link is probably the best solution.

Tomas


-- 
VOLNY klub: Modemisti vseho druhu, spojte se!
http://klub.volny.cz





More information about the fpc-pascal mailing list