www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Value Range Propagation

reply Walter Bright <newshound2 digitalmars.com> writes:
http://ddj.com/blog/archives/2011/02/value_range_pro.html
Feb 22 2011
next sibling parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Wed, 23 Feb 2011 08:23:32 +0200, Walter Bright  
<newshound2 digitalmars.com> wrote:

 http://ddj.com/blog/archives/2011/02/value_range_pro.html
http://www.digitalmars.com/d/2.0/ctod.html#types , which is linked from the article, still mentions the bit type. -- Best regards, Vladimir mailto:vladimir thecybershadow.net
Feb 22 2011
parent Robert Clipsham <robert octarineparrot.com> writes:
On 23/02/11 07:22, Vladimir Panteleev wrote:
 On Wed, 23 Feb 2011 08:23:32 +0200, Walter Bright
 <newshound2 digitalmars.com> wrote:

 http://ddj.com/blog/archives/2011/02/value_range_pro.html
http://www.digitalmars.com/d/2.0/ctod.html#types , which is linked from the article, still mentions the bit type.
I just flicked through that page, there's dozens of pre-D1 inaccuracies, not to mention all the inaccuracies if you're meaning D2. Someone should probably go through and clean this up. -- Robert http://octarineparrot.com/
Feb 23 2011
prev sibling next sibling parent reply Michal Minich <michal.minich gmail.com> writes:
V Tue, 22 Feb 2011 22:23:32 -0800, Walter Bright wrote:

 http://ddj.com/blog/archives/2011/02/value_range_pro.html
This case is missed. The result must be always in range of ubyte. ubyte ub; ubyte a = 255 - ub; // Error: cannot implicitly convert expression // (255 - cast(int)ub) of type int to ubyte
Feb 23 2011
parent Don <nospam nospam.com> writes:
Michal Minich wrote:
 V Tue, 22 Feb 2011 22:23:32 -0800, Walter Bright wrote:
 
 http://ddj.com/blog/archives/2011/02/value_range_pro.html
This case is missed. The result must be always in range of ubyte. ubyte ub; ubyte a = 255 - ub; // Error: cannot implicitly convert expression // (255 - cast(int)ub) of type int to ubyte
It's not fully implemented yet. That one is bug 3147. Bug 4887 and 5225 are other parts that aren't implemented.
Feb 23 2011
prev sibling next sibling parent reply "Simen kjaeraas" <simen.kjaras gmail.com> writes:
Walter Bright <newshound2 digitalmars.com> wrote:

 http://ddj.com/blog/archives/2011/02/value_range_pro.html
Now on Reddit: http://www.reddit.com/r/programming/comments/fr6ba/value_range_propagation_or_how_to_fit_those_two/ -- Simen
Feb 23 2011
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/23/11 12:03 PM, Simen kjaeraas wrote:
 Walter Bright <newshound2 digitalmars.com> wrote:

 http://ddj.com/blog/archives/2011/02/value_range_pro.html
Now on Reddit: http://www.reddit.com/r/programming/comments/fr6ba/value_range_propagation_or_how_to_fit_those_two/
The article never made it on reddit's programming page. I sent a question to moderators. Andrei
Feb 23 2011
parent Walter Bright <newshound2 digitalmars.com> writes:
Andrei Alexandrescu wrote:
 On 2/23/11 12:03 PM, Simen kjaeraas wrote:
 Walter Bright <newshound2 digitalmars.com> wrote:

 http://ddj.com/blog/archives/2011/02/value_range_pro.html
Now on Reddit: http://www.reddit.com/r/programming/comments/fr6ba/value_range_propagation_or_h w_to_fit_those_two/
The article never made it on reddit's programming page. I sent a question to moderators.
It's up now. The moderators fixed it.
Feb 23 2011
prev sibling parent =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger free.fr> writes:
Walter Bright wrote:
 http://ddj.com/blog/archives/2011/02/value_range_pro.html
The max value for an unsigned char is 255, not 256. Other than that, a pretty interesting article, thanks. Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Feb 23 2011