[fpc-pascal] Re: Temporary Filenames in GO32

Jason P Sage jasonpsage at jegas.org
Fri Oct 13 16:08:14 CEST 2006

On Wed, 11 Oct 2006, Jason P Sage wrote:

>> I read an old thread about how to make temporary filenames (unique 
>> filenames is what the topic was about) and I have written a simple 
>> unit that sort of does this without needing a second to elapse (or 
>> millisecond for that
>> matter) to pass in order to get the next unique name. I have heard of a
>> possible unit or routine that MAY be available to us FPC coders that does
>> some sort of GUID algorithm. this would interest me. 

Then Michael Wrote:

>What is the problem with the systutils version of gettempfilename ? On
>windows, this reverts to the OS call. On other platforms, an own
>implementation is used.

Hello Michael. 

This may work even better! If this works faster than the method I
implemented, I'd much rather use it in place of my own. I will have to do
some experimenting with it, but if it generates unique filenames under load
(multiple programs all using the same call simultaneously) without flaw,
than I will definitely adopt the FPC method sysutils.GetTempFilename - for
code management, portability reasons, and the likelihood of a performance
boost to what I have devised and am using now.

Perhaps the original author who was trying to do this for GO32 (whose email
request was a few years old now Nov, 2001 I think) was unaware of this
GetTempFileName call, it didn't exist then, or it did not work for him in
GO32, at least there are "home made" alternatives one could devise with a
little creativity that can accomplish the same thing as I have done.

Thank You,
Jason P Sage 

More information about the fpc-pascal mailing list