POV-Ray : Newsgroups : povray.programming : HF height: bug report : Re: HF height: bug report Server Time
6 Oct 2024 11:09:30 EDT (-0400)
  Re: HF height: bug report  
From: Warp
Date: 5 Aug 2001 19:58:32
Message: <3b6ddda7@news.povray.org>
In povray.unofficial.patches Thorsten Froehlich <thorsten@trf.de> wrote:
: Or should a compiler warn i.e. in a case like
: "int i = 01;" because the programmer might have meant to write "0"?

  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.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

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