Nov 24, 2009 #1 CJason Programmer Oct 13, 2004 223 US Is there a way to define the text "TRUE" to be interpreted as 1 and "FALSE" interpreted as 0? For example: Code: $a = "FALSE"; if (!$a) { print "IT IS FALSE\n"; } In the above, I'd like it to print "IT IS FALSE\n"; Thanks!
Is there a way to define the text "TRUE" to be interpreted as 1 and "FALSE" interpreted as 0? For example: Code: $a = "FALSE"; if (!$a) { print "IT IS FALSE\n"; } In the above, I'd like it to print "IT IS FALSE\n"; Thanks!
Nov 24, 2009 #2 feherke Programmer Aug 5, 2002 9,540 RO Hi Sounds like a case to use [tt]constant::boolean[/tt]. Must that be string ? Feherke. http://free.rootshell.be/~feherke/ Upvote 0 Downvote
Hi Sounds like a case to use [tt]constant::boolean[/tt]. Must that be string ? Feherke. http://free.rootshell.be/~feherke/
Nov 24, 2009 Thread starter #3 CJason Programmer Oct 13, 2004 223 US Cool! That just might work for me!! Thanks for the pointer! Upvote 0 Downvote