Re: Standard Input Max Length Limitation

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

Bryan So wrote:

> It will not allow you to type more than 128 characters.  The
> cursor simply stays put after typing a while.

include get.e
function Console_Get()
  sequence lInput
  integer lChar

  lInput = {}

  lChar = wait_key()
  while lChar != '\r' do
       if lChar >= ' ' and lChar < 127
              or
          lChar = '\t'
       then
           puts(1, lChar)
           lInput &= lChar
       end if
       lChar = wait_key()
  end while

  return lInput
end function

sequence s
s = Console_Get()
printf(1, "\nLength: %d\n", length(s))

-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

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

Search



Quick Links

User menu

Not signed in.

Misc Menu