Re: Re: String to Boolean

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 27 Oct 2005 09:33:23 +0200, Brian Etheridge  
<Brian.Etheridge@xxxxxxxxxxx> wrote:

Heard of a check box :)

I agree that if you end up with this solution then you are probly
solving the wrong problem.
(Before doing anything in programming ask yourself this:
   1. Am I solving the problem right?
   2. Am I solving the right problem?)

This string comparison approach is pretty cumbersome to write.
(Particularly on the html side.)

In a file a boolean is best stored as a integer. 0 means false all other  
values true.
Now the boolean is (val != 0). (1 typically denotes true.. but -1 is also  
sometimes used)

> Hi Sylvano,
> I think you will get very little response to your query because the  
> nature
> of what you are trying to do is completely wrong.  Back up a bit and
> describe why you think you need to parse a string to determine true or
> false.
>
> All I can think of is that you are posting a form with various selection
> criteria obtained from several listboxes set to TRUE or FALSE.  There  
> must
> be a better way of handling the user interface, or these responses,  
> rather
> than parsing them as strings.
>
> Give us a bit more information.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux