Re: Line ends gotcha

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

The only statements that require a line break are shebang (e.g. #!/usr/bin/eui) and include. Shebang specifically has to have line feed only '\n' to work on *NIX. Beyond that the interpreter treats whitespace as whitespace whether it's a space ' ', tab '\t', carriage return '\r', or line feed '\n'. You could write an entire program without line breaks. My guess is this is a problem with eutest and not the interpreter itself. Can you provide a simple example that reproduces the problem?

Scratch that. I did some preliminary testing and yes it seems the interpreter only processes the first line when CR is the only line break character.

Either of these print "one" and "two" as expected:

puts(1,"one\n")\n 
puts(1,"two\n")\n 
puts(1,"one\n")\r\n 
puts(1,"two\n")\r\n 

But this only prints "one" and then... exits?

puts(1,"one\n")\r 
puts(1,"two\n")\r 

This is very strange because, as I indicated in my original response, these characters shouldn't make a difference. More investigation is required.

-Greg

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

Search



Quick Links

User menu

Not signed in.

Misc Menu