Foreach with byte problems

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Feb 25 11:51:18 PST 2011


On 2/25/11, Steven Schveighoffer <schveiguy at yahoo.com> wrote:
> a dirty trick you could do is add 0, which should promote the arg to int.

Cool. I've almost used +1-1, LOL!

Well, I thought DMD would simply ignore +0 (dead code elimination?),
but apparently this is a cool shorthand for casting literals? Nice.


More information about the Digitalmars-d-learn mailing list