Re: Standard Input Max Length Limitation

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

Robert Craig wrote:
> 
> Pete Lomax wrote:
> > Matt Lewis wrote:
> > > Is there a particular reason why you want to run under DOS instead of
> > > windows?  You can use exwc.exe, which is the console version of the
> > > interpreter for windows.
> > I thought about that but a test showed it limited input to 79 characters!
> 
> I'm not sure why that is, but there's no magic number built into
> Euphoria itself that limits gets(0). It will happily malloc
> space for millions of characters.

Yep, and it works as expected if you pipe stdio instead of typing it.
 
> If I open a command-prompt window with XP,
> and hold down the 'x' key, it complains that
> "'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' is not recognized as an internal 
> or external command, operable program or batch file"
> 
> But when I reach 259 x-characters it changes the complaint to:
> "The input line is too long."
> 
> Note, I'm not running a Euphoria program at all,
> just entering a command at the prompt.

Yeah, I'm that's a limitation of cmd.exe, but I was surprised to find that 
I could only get 79 characters typed into the console when I run this code:
? length( gets(0) & 0 ) - 1

I suspect that it's something to do with the console buffer not wanting to 
do a line wrap, but I haven't dug deep enough to figure out if that's true.

I haven't tried at all with linux.

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu