|
|
In article <3b6ddda7@news.povray.org> , Warp <war### [at] tagpovrayorg> wrote:
> Actually 01 is an octal number ;)
>
> (In fact, that's another place where you can shoot yourself in the foot
> with C. You might sometimes write something like "i = 011;" to "indent" the
> number with other similar numbers and then you are surprised when the
> program behaves very strangely...)
>
> This is actually one place where the compiler assumes that the user
> really wanted an octal number and that it wasn't just a mistake.
Exactly. And in my example (unlike 011) it wouldn't even make a difference
if one wrote 01 or 1. So why does it make a difference if I write 'ab'? --
Both are features of the language. They are both a bit "unexpected", but
still perfectly legal!
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|