Re: gets(0) quibble...

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

>> Question: Which style of input() has Rob used in prompt_string() in the
>> new library files? Or does he avoid gets() altogether?


I consider this a bug and am assuming Robert will fix it. (btw: did you fix the
zero bug in puts ?)
Anyway, here is a working 'wrapped' version of gets ()

global function gets (integer fh)
sequence s

    s = {getc(fh)}
    while s[length(s)] != '\n' do
        s = append(s, getc(fh))
    end while

    return s
end function

This will work.

Ralf Nieuwenhuijsen
.... Mailto://nieuwen at xs4all.nl
.... Http://www.xs4all.nl/~nieuwen
.... Uin://9289920

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

Search



Quick Links

User menu

Not signed in.

Misc Menu