POV-Ray : Newsgroups : povray.programming : POV-Ray 3.5 for AmigaOS : Re: POV-Ray 3.5 for AmigaOS Server Time
3 Jul 2024 05:31:02 EDT (-0400)
  Re: POV-Ray 3.5 for AmigaOS  
From: Warp
Date: 3 Jun 2004 12:20:07
Message: <40bf4fb7@news.povray.org>
Dan P <dan### [at] yahoocom> wrote:
> first, I thought enums had to assign to ints

  And since when 'abcd' has not been an int?

> and 
> second, I thought single quotes were for characters, not strings).

  No, 'a' is not a character, it's an integer. 'ab' is also an integer.

  Just try: std::cout << 'ab' << std::endl;

> The compiler agreed on both counts

  If enumerated types can only be assigned with integers (which is true)
and 'abcd' is not an integer (which is false), then the compiler would
give you an error. However, the compiler did not give you an error and
thus the compiler is disagreeing with you.

> So, I created a PERL script to grab each of those 
> strings and generate a file with defines called "povtypes.h" and made 
> those defines with unique IDs starting from 1000.

  What for? What is the current code doing wrong?

> Is there some program in-between that turns those 
> happy 'strings' into numbers?

  They are not strings. Learn C, will you?

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


Post a reply to this message

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