Board index » delphi » Confusing runtime error porting to TPW

Confusing runtime error porting to TPW

Quote
In article <slrnau7m8n.r1.tav...@otaku.freeshell.org>, taviso wrote:
> or with pretty colours:

> http://taviso.decsystem.org/fncbookingadd.html
> http://taviso.decsystem.org/fncbookingsearch.html

> the runtime error occurs here:

> http://taviso.decsystem.org/fncbookingadd.html#line470

> thanks so much!

> btw: if if anyone here can help me solve this error i plan on including
> any responses in my project write up, i hope thats okay

I'm no BP expert (if it was the otherway around, it'd be my job to solve the FPC case :-),
but maybe close() is destructive to the assign()ment.

What happens if you reassign the filehandle before erasing?

So assign(filbookings,'itsname'); just before erase()ing ?

 

Re:Confusing runtime error porting to TPW


Quote
In article <slrnau7rrl.fgq.tav...@otaku.freeshell.org>, taviso wrote:
> In article <slrnau7p7p.9e7.mar...@toad.stack.nl>, Marco van de Voort wrote:
>> I'm no BP expert (if it was the otherway around, it'd be my job to solve the FPC case :-),
>> but maybe close() is destructive to the assign()ment.

>> What happens if you reassign the filehandle before erasing?

>> So assign(filbookings,'itsname'); just before erase()ing ?

> Markov, i think you have helped me solve the problem!

> i had tried to add an assign, but not directly after the close, if i do
> this the runtime error changes from 5 to 32 (which unsurprisingly is
> undocumented in Borlands help file!), but a quick google search returns
> this

> http://groups.google.co.uk/groups?th=d4b2a79293b0c21b

> which seems to suggest a problem with windows NT (im using windows 2000,
> which as i understand it is related to windows nt - im no windows
> expert :) and can be easily solved by specifying a file mode.

> This seems to fix it under wine, so im optimistic of it working under
> windows when i try it, Thanks!!

Note that this is implementation dependant, and wise to change it in the
original FPC version too.

Other Threads