View Single Post
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 11-01-2008 , 22:39   Re: [TUT/INFO] Condition operator aka ? and :
Reply With Quote #22

Quote:
Originally Posted by Hawk552 View Post
In Pawn, there's no such thing as a bool. The "bool" tag doesn't save any extra space or reduce any amount of logical operations. Your code requires additional, useless instructions and is a bad example for people who are learning.
This is only true because PLUGIN_CONTINUE and PLUGIN_HANDLED correspond to 0 and 1. For other values, like FMRES_*, they may not. In this special case, it's easier to do as you stated. However, in others, this solution maybe cleaner than an if() statement.
__________________

Community / No support through PM
danielkza is offline