1. Rob: Minor special character glitch?
- Posted by Vincent <darkvincentdude at yahoo.com> Mar 11, 2006
- 461 views
Rob, I noticed that you can use a single quote with print, printf, puts, so on. without needing to use a special character backslash. Was this intentional or just a uncaught glitch? puts(1, "''''''''''") -- works ? puts(1, "\'\'\'\'\'\'\'\'\'\'") -- works This isn't a problem or anything but maybe deviates from expected behavor? Regards, Vincent
2. Re: Rob: Minor special character glitch?
- Posted by Al Getz <Xaxo at aol.com> Mar 11, 2006
- 466 views
Vincent wrote: > > Rob, > > I noticed that you can use a single quote with print, printf, puts, so on. > without > needing to use a special character backslash. Was this intentional or just a > uncaught glitch? > > puts(1, "''''''''''") -- works ? > puts(1, "\'\'\'\'\'\'\'\'\'\'") -- works > > This isn't a problem or anything but maybe deviates from expected behavor? > > > Regards, > Vincent Hi, What are you saying? Single quote is just another printable char right? Should print just like any other char when it's part of a string right? Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"
3. Re: Rob: Minor special character glitch?
- Posted by Robert Craig <rds at RapidEuphoria.com> Mar 11, 2006
- 453 views
Vincent wrote: > I noticed that you can use a single quote with print, printf, puts, so on. > without > needing to use a special character backslash. Was this intentional or just a > uncaught glitch? > > puts(1, "''''''''''") -- works ? > puts(1, "\'\'\'\'\'\'\'\'\'\'") -- works > > This isn't a problem or anything but maybe deviates from expected behavor? That was intentional. Inside a double-quote string you can use a single quote directly without escaping it, since there is no confusion. Similarly, inside a sinqle-quote character you can use a double quote with or without escaping it. e.g. '"' Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
4. Re: Rob: Minor special character glitch?
- Posted by Vincent <darkvincentdude at yahoo.com> Mar 11, 2006
- 458 views
Al Getz wrote: > What are you saying? Single quote is just another printable char right? > Should print just like any other char when it's part of a string right? In Refman Part 1 - Section 2 : 2.1.2 Character Strings and Individual Characters Special characters may be entered using a back-slash: \n newline \r carriage return \t tab \\ backslash \" double quote \' single quote I havent noticed this before. Perhaps this is normal. I guess I'm thinking since we cant do this: puts(1, """""""""") Maybe I just dont understand. Hehe... Regards, Vincent
5. Re: Rob: Minor special character glitch?
- Posted by Vincent <darkvincentdude at yahoo.com> Mar 11, 2006
- 472 views
Robert Craig wrote: > That was intentional. > Inside a double-quote string you can use a single quote > directly without escaping it, since there is no confusion. > Similarly, inside a sinqle-quote character you can use > a double quote with or without escaping it. e.g. '"' Ahh ok... I understand now. Stupid me. :P Regards, Vincent