Re: Standard Input Max Length Limitation
- Posted by Robert Craig <rds at RapidEuphoria.com> Jun 28, 2007
- 770 views
Fernando Bauer wrote: > If you run for DOS (ex.exe) it results 128 in my system (WinXP). > If I am right, the result obtained (79) in case of Windows is related to the > position, not to the quantity of characters. > Try this: > position(1,70) > ? length( gets(0) & 0 ) - 1 > > In file be_runtime.c we can read in the function key_gets() (from line 4529 > of version 3.0.2): > if (column < 79) { > len = strlen(input_string); > one_char[0] = c; > ... > This function is called by wingetch() which is called by EGets(). > If the exw.exe is compiled with BORLAND or LCC, probably the result will be > different, because key_gets() isn't called. > Maybe Rob could better explain that limit for Windows? Thanks for pointing out that code. I thought I was using key_gets() just for input during the interactive trace, but see now I'm also using it more generally when WATCOM for Windows is the C compiler used, i.e. in exw.exe and exwc.exe. key_gets() also handles backspaces, left-arrow etc. If anyone wants to experiment with increasing the 79 limit, feel free. I'm not sure it will work though in an 80-character wide Windows console. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com