file numbers, puts, seek and NT 4

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

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.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu