* reset boolean. @ 1996-08-19 0:00 Charlie_Brown 1996-08-18 0:00 ` Robert Dewar ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Charlie_Brown @ 1996-08-19 0:00 UTC (permalink / raw) Hi to all, I have a question regarding a boolean statement. What I want to do is reset the statement to neither false nor true. Is it possible? If anyone has an idea please help me out. Thanks in advance. Lyndon. ____________________________________________________________________ | ----====>>>> Lyndon Bernard Firmin <<<<====---- | |--==>> The Royal Melbourne Institute of Techology, Australia <<==-- | | ----====>>>> email: firmin@yallara.cs.rmit.edu.au <<<<====---- | |____________________________________________________________________| ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: reset boolean. 1996-08-19 0:00 reset boolean Charlie_Brown @ 1996-08-18 0:00 ` Robert Dewar 1996-08-19 0:00 ` Ken Price 1996-08-21 0:00 ` Neil O'Brien 2 siblings, 0 replies; 7+ messages in thread From: Robert Dewar @ 1996-08-18 0:00 UTC (permalink / raw) Lyndon (Charlie-Brown) asks " I have a question regarding a boolean statement. What I want to do is reset the statement to neither false nor true. Is it possible? If anyone has an idea please help me out. Thanks in advance." That certainly is confused. What is a boolean statement? How can you possibly reset a statement to anything? Well guessing game time, it soulds like you are asking if it is possible to set a Boolean *variable* to a value other than True or False. The answer is of course not. However, you might want to define your own type type Extended_Boolean is (False, True, Neither); of course if you have a value of this type you need to check explicitly for it being equal to False or True, you can't just use the value directly in a Boolean context (like an if condition). ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: reset boolean. 1996-08-19 0:00 reset boolean Charlie_Brown 1996-08-18 0:00 ` Robert Dewar @ 1996-08-19 0:00 ` Ken Price 1996-08-21 0:00 ` Neil O'Brien 2 siblings, 0 replies; 7+ messages in thread From: Ken Price @ 1996-08-19 0:00 UTC (permalink / raw) To: Charlie_Brown Charlie_Brown wrote: > > Hi to all, > I have a question regarding a boolean statement. > What I want to do is reset the statement to neither false nor true. > Is it possible? > If anyone has an idea please help me out. > Thanks in advance. > Lyndon. > > ____________________________________________________________________ > | ----====>>>> Lyndon Bernard Firmin <<<<====---- | > |--==>> The Royal Melbourne Institute of Techology, Australia <<==-- | > | ----====>>>> email: firmin@yallara.cs.rmit.edu.au <<<<====---- | > |____________________________________________________________________| You really don't want a boolean value then. Create another enumeration type to do your bidding... The new enumeration type can contain the enumerations False, True, and Neither_True_Nor_False; the compiler will not confuse the True/False of Boolean and your True/False. ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: reset boolean. 1996-08-19 0:00 reset boolean Charlie_Brown 1996-08-18 0:00 ` Robert Dewar 1996-08-19 0:00 ` Ken Price @ 1996-08-21 0:00 ` Neil O'Brien 1996-08-21 0:00 ` Adam Beneschan 1996-08-21 0:00 ` Ian Ward 2 siblings, 2 replies; 7+ messages in thread From: Neil O'Brien @ 1996-08-21 0:00 UTC (permalink / raw) On Sunday, August 18, 1996, Charlie_Brown wrote... > Hi to all, > I have a question regarding a boolean statement. > What I want to do is reset the statement to neither false nor true. > Is it possible? > If anyone has an idea please help me out. > Thanks in advance. > Lyndon. > It is a truth value, it can only have two possible settings true or false, but you could declare your own enumeration type for example my_bool is (true, false, neutral) and use that instead - to be honest it seems a bit of a bizarre thing to want to do, perhaps if you explained why you want it someone might be able to suggest a better way. -- ========================================================= Neil O'Brien obrien@east.thomsoft.com Customer Support (617) 221 7320 Thomson Software Products They're the wrong trousers Grommit, and they've gone wrong! ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: reset boolean. 1996-08-21 0:00 ` Neil O'Brien @ 1996-08-21 0:00 ` Adam Beneschan 1996-08-22 0:00 ` Larry Hazel 1996-08-21 0:00 ` Ian Ward 1 sibling, 1 reply; 7+ messages in thread From: Adam Beneschan @ 1996-08-21 0:00 UTC (permalink / raw) Neil O'Brien <obrien@east.thomsoft.com> writes: > >On Sunday, August 18, 1996, Charlie_Brown wrote... >> Hi to all, >> I have a question regarding a boolean statement. >> What I want to do is reset the statement to neither false nor true. >> Is it possible? >> If anyone has an idea please help me out. >> Thanks in advance. >> Lyndon. >> > >It is a truth value, it can only have two possible settings true or false, >but you could declare your own enumeration type for example > >my_bool is (true, false, neutral) > >and use that instead - to be honest it seems a bit of a bizarre thing to >want to do, perhaps if you explained why you want it someone might be able >to suggest a better way. > I've never understood these three-way Booleans. To be complete, shouldn't there be a lot more values in the enumeration type? E.g.: type My_Bool is (True, False, Maybe, True_And_False, It_Depends, Dont_Know, Dont_Care, None_Of_Your_Business, All_Of_The_Above); :) -- Adam ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: reset boolean. 1996-08-21 0:00 ` Adam Beneschan @ 1996-08-22 0:00 ` Larry Hazel 0 siblings, 0 replies; 7+ messages in thread From: Larry Hazel @ 1996-08-22 0:00 UTC (permalink / raw) Adam Beneschan wrote: [snip] > > I've never understood these three-way Booleans. To be complete, > shouldn't there be a lot more values in the enumeration type? E.g.: > > type My_Bool is (True, False, Maybe, True_And_False, It_Depends, > Dont_Know, Dont_Care, None_Of_Your_Business, > All_Of_The_Above); > How about type Illogical is (Maybe, Maybe_Not); -- Larry Hazel => Larry.H.Hazel@cpmx.saic.com (205) 876-4509 -- I try to stay above C level, I get C sick. -- Team Ada & Team OS/2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: reset boolean. 1996-08-21 0:00 ` Neil O'Brien 1996-08-21 0:00 ` Adam Beneschan @ 1996-08-21 0:00 ` Ian Ward 1 sibling, 0 replies; 7+ messages in thread From: Ian Ward @ 1996-08-21 0:00 UTC (permalink / raw) In article fc899dc0@fielding.east.alsys.com, Neil O'Brien <obrien@east.thomsoft.com> () writes: > >On Sunday, August 18, 1996, Charlie_Brown wrote... >> Hi to all, >> I have a question regarding a boolean statement. snip... > >It is a truth value, it can only have two possible settings true or false, >but you could declare your own enumeration type for example Neil, you forgot one instance. Ada can define the optional very_true, almost_true, and true_enough for use in political and pension advisors software. :-) (One must not forget the "/" operator which for intel processors can be overloaded with "?/"; Plus, finally, the what_do_you_think_it_is, for artistic and child centred learning software.) Best regards, Ian --- Ian Ward's opinions only : wardi@rsd.bel.alcatel.be ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1996-08-22 0:00 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1996-08-19 0:00 reset boolean Charlie_Brown 1996-08-18 0:00 ` Robert Dewar 1996-08-19 0:00 ` Ken Price 1996-08-21 0:00 ` Neil O'Brien 1996-08-21 0:00 ` Adam Beneschan 1996-08-22 0:00 ` Larry Hazel 1996-08-21 0:00 ` Ian Ward
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox