Re: file numbers, puts, seek and NT 4

new topic     » goto parent     » topic index » view thread      » older message » newer message

Try putting a +AFw-n newline at the end of the string.
puts( 1, "G'day mate, 'owyergoin?+AFw-n" )

I think I've encountered that before, in NT.

Greg


Bruce M. Axtens wrote:

> I suppose its written down somewhere, but with the following program, gday.ex,
>
>     puts( 1, "G'day mate, 'owyergoin?" )
>
> in Windows NT 4.0, repetitively executing
>
>     ex gday >> gday.log
>
> does not build up a file full of G'day's. Rather the puts simply writes the
> file
> with a single line over and over again. If you want the append to occur you
> have
> to rewrite the program as
>
>     seek( 1, -1 )
>     puts( 1, "G'day mate, 'owyergoin?" )
>
> and then it will work as expected. This does not appear to be the case under
> Windows 95 or MSDOS. This is a hidden gotcha. Either that or I have finally
> gone
> round the twist. If its the latter, I can cope with the embarrassment. If the
> former, the documentation better say something about it.
>
> Bruce.



--
Greg Phillips
i.shoot at rednecks.com
http://euphoria.server101.com
--

Useless fact of the day:

The Queen termite can live up to 50 years and have 30,000 children every day.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu