Re: puts() quirk
- Posted by Juergen Luethje <j.lue at gmx.de> Apr 23, 2003
- 406 views
These lines may be deleted by Topica ... Hello Bruce, you wrote: > I don't know if anyone's noticed this before ... maybe it's old news. > > sequence a > sequence b > > a = { 'c', 'a', 't', 0, 0, 0 } > b = "dog" > > puts( 1, a & "\n" ) > puts( 1, b ) > > This outputs > catdog > Rather than > cat > dog > As one might expect. > > Indeed, if one combines the puts() into one, e.g. > puts( 1, a & "\n" & b ) > then the program outputs > cat > > Weird. A byte with value 0, and all other bytes after that in the argument of puts(), are ignored by the console window. AFAIK that is the standard behaviour of the console output. > Bruce. > (Windows 2000 Advanced Server, Euphoria 2.4 beta, DOS32 script in a > CMD.EXE window) Best regards, Juergen -- /"\ ASCII ribbon campain | \ / against HTML in | Money is the root of all evil. X e-mail and news, | Send 20 Dollars for more info. / \ and unneeded MIME |