|
![](/i/fill.gif) |
In article <Xns95CF3BB3DD30Araf256com@203.29.75.35>,
"Rafal 'Raf256' Maj" <spa### [at] raf256 com> wrote:
>>Hi,
>>syntax like
>>
>>#local size = big ? 100 : 50;
>>
>>(from C "operator?" ) isnt working, and writting it normaly as:
>>
>>#if (big) #local size=100; #else #local size=50; #end
>>
>>is quite long (I like to keep my syntax short). So I wanted to write a tiny
>>IfElse function, like:
>>
>>#macro IfElse(A,B,C) #if (A) 55 #else 30 #end #end
>>
>>#local DD = IfElse(variant_Wide, 50, 100);
>>
>>but it gaves a pares error.
>>
>>I replaced it with good sytnax:
>> #macro IfElse(A,B,C) select(A-1,C,B,C) #end
>>that do work, but just for curiosity, how to make previous syntax work
>>also?
hi,
- "size" is a reserved keyword from pov.
- "c" like comparaison works as this : #local mySize=(bib?100:50);
- macro in pov is not the same as macro in c. there is no "code
substitution".
- you ca write : #macro IfElse(A,B,C) (A?B:C) #end ... but it's more
long that the direct pov sdl (A?B:C) syntax form.
Post a reply to this message
|
![](/i/fill.gif) |