|
|
"mysdn" <kam### [at] hotmailcom> wrote:
> is it possible to write
>
> #if (DoorModel == model_101) in an if statement
In POV 3.6, you can achieve this using:
#if (strcmp(DoorModel,model_101)) ...
In POV 3.7, POV-Ray's comparison operator works for strings, too, so you can
also use:
#if (DoorModel = model_101) ...
(Note the single equals sign; POV-Ray does *not* use C/C++ style operators.)
> and in switches
>
> #switch(DoorModel)
>
> #case (model_101)// do that
>
> I want to test for strings, is ttah possible in pov.
No, that's only possible with float values, even in 3.7.
Out of curiosity: Are you sure you want to use strings for the model
identifiers? A numeric id would do, I guess. After all, you can always use
those identifiers you have, like model_101, so you don't have to memorize all
the - possibly cryptic - ids.
If you absolutely need to work with strings for model identifiers, I suggest
translating them to numerical ids first, by looking them up in an array.
Post a reply to this message
|
|