View previous topic :: View next topic |
Author |
Message |
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Mon Oct 01, 2007 4:22 am Post subject: 'while' suggestion |
|
|
It would be nice if one could write something like
Code: | while(a=b())
{
write(a);
} |
in MiniD. Currently it says something like expression expected... |
|
Back to top |
|
|
JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Mon Oct 01, 2007 6:30 am Post subject: |
|
|
I think that's a bit scary, because "while(a = b())" is illegal for the entire reason that 95% of the time, it's a typo and should be "while(a == b())". However, something like "while(local a = b())", and correspondingly, "if(local a = b())", are very D-like and have no such issues. I'd like to have those. |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Mon Oct 01, 2007 7:47 am Post subject: |
|
|
I agree, but the reason I don't like local is because it is too long to write. Me personally would rather prefer something like var for synonym to local. |
|
Back to top |
|
|
|