POV-Ray : Newsgroups : povray.off-topic : Teach yourself C++ in 21 days : Re: Days 1-5 Server Time
29 Jul 2024 16:19:11 EDT (-0400)
  Re: Days 1-5  
From: Invisible
Date: 23 Apr 2012 04:08:51
Message: <4f950e13$1@news.povray.org>
>> Ever heard of something called a "mistake"? Perhaps you don't make those,
>> but I do sometimes. And it's worrying to know that if I do, the compiler
>> isn't going to say "oh, you made a mistake", it's just going to generate
>> code that does something bizarre.
>
> Sure. And if you randomly change * to / and + to -, you'll get similar
> errors. In practice, it's not a mistake people make.

If you're in the middle of writing an expression, and the phone rings or 
something, and then you got back and hit "compile", it says "hey dude, 
this * operator only has one argument. Shouldn't there be two?"

But, apparently, if you're half way through writing a function call and 
the same thing happens, the compiler doesn't say anything, because comma 
is just a valid operator that you can put anywhere you want...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.