for loop

Ellery Newcomer ellery-newcomer at utulsa.edu
Mon Jan 23 09:18:59 PST 2012


On 01/22/2012 11:37 AM, Zachary Lund wrote:
>
> This is an ugly solution (and I'm not 100% sure it's valid D) but:
>
> /+++++++++++++++++++++++++++++/
> void main() {
> {
> short y = 0;
> int x = 0;
>
> for (; x < 10; ++x, ++y)
> {
> }
> }
> }
> /+++++++++++++++++++++++++++++/

raise you.


void main(){
         for ({int x=0; short y=0;} x < 10; x++, y++){
         }
}


More information about the Digitalmars-d-learn mailing list