On 9/21/2018 12:51 AM, dick balaska wrote:
> On 09/20/2018 02:56 PM, Kenneth wrote:
>
>>
>> This would be the (longer) way that I would write such a macro (just for
>> visual/mental clarity):
>>
>> #macro FormatKeyword(Format)
>> #if (Format = "png")
>> png
>> #else
>> #if(Format = "jpeg")
>> jpeg
>> #else
>> #if(Format = "bmp")
>> bmp
>> #else
>> #end
>> #end
>> #end
>> #end // of macro
>>
>
>
> I would write:
>
> #macro FormatKeyword(Format)
> #if (Format = "png") png #end
> #if (Format = "jpeg") jpeg #end
> #if (Format = "bmp") bmp #end
> #end
>
You could use SWITCH and CASE as well.
Mike
Post a reply to this message
|