Thread overview
enum : bool
Jun 12, 2008
BCS
Jun 13, 2008
Rioshin an'Harthen
Jun 13, 2008
Tower Ty
Jun 14, 2008
Tower Ty
Jun 15, 2008
BCS
June 12, 2008
This works

enum Test : bool
{
	yes = true,
	no = false
}
	
void TestIt(Test);

TestIt(Test.yes);


Is any one makeing use of it? It allows for more usefull nameing.


June 12, 2008
"BCS" <ao@pathlink.com> wrote in message news:55391cb32e20b8ca9ab3c6527b36@news.digitalmars.com...
>
> This works
>
> enum Test : bool
> {
> yes = true,
> no = false
> }
>
> void TestIt(Test);
>
> TestIt(Test.yes);
>
>
> Is any one makeing use of it? It allows for more usefull nameing.

Would've been funny if

enum MyBool : bool
{
    True,
    False,
    FileNotFound
}

worked but alas, the compiler (shockingly!) isn't buggy and errors on the overflow..


June 13, 2008
"Jarrett Billingsley" <kb3ctd2@yahoo.com> kirjoitti viestissä news:g2satg$2gl$1@digitalmars.com...
>
> Would've been funny if
>
> enum MyBool : bool
> {
>    True,
>    False,
>    FileNotFound
> }
>
> worked but alas, the compiler (shockingly!) isn't buggy and errors on the overflow..

Someone obviously reads the daily wtf... 

June 13, 2008
Jarrett Billingsley Wrote:

> "BCS" <ao@pathlink.com> wrote in message news:55391cb32e20b8ca9ab3c6527b36@news.digitalmars.com...
> >
> > This works
> >
> > enum Test : bool
> > {
> > yes = true,
> > no = false
> > }
> >
> > void TestIt(Test);
> >
> > TestIt(Test.yes);
> >
> >
> > Is any one makeing use of it? It allows for more usefull nameing.
> 
> Would've been funny if
> 
> enum MyBool : bool
> {
>     True,
>     False,
>     FileNotFound
> }
> 
> worked but alas, the compiler (shockingly!) isn't buggy and errors on the overflow..
> 
> 
Ok fellas so is there anything I can learn here?
Can I put this to use somehow ?
Is it showing a correct function or an incorrect one?
More detail please.
June 13, 2008
"Tower Ty" <towerty@msn.com.au> wrote in message news:g2ujs9$qv3$1@digitalmars.com...

> Ok fellas so is there anything I can learn here?
> Can I put this to use somehow ?
> Is it showing a correct function or an incorrect one?
> More detail please.

http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx

Classic example of code that's just... wow.  _That_ bad.


June 14, 2008
Jarrett Billingsley Wrote:

> "Tower Ty" <towerty@msn.com.au> wrote in message news:g2ujs9$qv3$1@digitalmars.com...
> 
> > Ok fellas so is there anything I can learn here?
> > Can I put this to use somehow ?
> > Is it showing a correct function or an incorrect one?
> > More detail please.
> 
> http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx
> 
> Classic example of code that's just... wow.  _That_ bad.
> 
> 
Good Jarrett . Only two states on and off.
So you would be the man to make more of this . Our present day electronics are much more capable now of giving many more discernable positive states in charge from 0 to 5 volts ought be 6 steps of 1 volt or maybe 8 of a little less.

If we had 8 it would be stunning in speed and capacity . Like the DNA   UCAG codeing is much superior to on/off.

In your position I wonder if you pursue any thought along those lines?
June 15, 2008
"Tower Ty" <towerty@msn.com.au> wrote in message news:g31cir$16tt$1@digitalmars.com...

> Good Jarrett . Only two states on and off.
> So you would be the man to make more of this . Our present day electronics
> are much more capable now of giving many more discernable positive states
> in charge from 0 to 5 volts ought be 6 steps of 1 volt or maybe 8 of a
> little less.
>
> If we had 8 it would be stunning in speed and capacity . Like the DNA UCAG codeing is much superior to on/off.
>
> In your position I wonder if you pursue any thought along those lines?

I haven't, at least not much.  Though I think there might be some merit in analog computers that use a fully variable range of voltages (which bears a slight resemblance to how (we think) neurons work).

Then there are quantum computers where each qubit is 1, 0, or "something else" and I don't even want to _know_ what those are all about ;)


June 15, 2008
Reply to Tower,

> Jarrett Billingsley Wrote:
> 
>> "Tower Ty" <towerty@msn.com.au> wrote in message
>> news:g2ujs9$qv3$1@digitalmars.com...
>> 
>>> Ok fellas so is there anything I can learn here?
>>> Can I put this to use somehow ?
>>> Is it showing a correct function or an incorrect one?
>>> More detail please.
>> http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx
>> 
>> Classic example of code that's just... wow.  _That_ bad.
>> 
> Good Jarrett . Only two states on and off.
> So you would be the man to make more of this . Our present day
> electronics are much more capable now of giving many more discernable
> positive states in charge from 0 to 5 volts ought be 6 steps of 1 volt
> or maybe 8 of a little less.
> If we had 8 it would be stunning in speed and capacity . Like the DNA
> UCAG codeing is much superior to on/off.
> 
> In your position I wonder if you pursue any thought along those lines?
> 

Analog computers have been built. They are much less tolerant to noise than digital ones. Also They /may/ get into some information theory issues there it becomes easier (less power etc.) to just pump up the clock speed than use more complex waveforms. (I know a guy who would know if anyone is interested)