FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

'while' suggestion

 
Post new topic   Reply to topic     Forum Index -> MiniD
View previous topic :: View next topic  
Author Message
bobef



Joined: 05 Jun 2005
Posts: 269

PostPosted: Mon Oct 01, 2007 4:22 am    Post subject: 'while' suggestion Reply with quote

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
View user's profile Send private message
JarrettBillingsley



Joined: 20 Jun 2006
Posts: 457
Location: Pennsylvania!

PostPosted: Mon Oct 01, 2007 6:30 am    Post subject: Reply with quote

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
View user's profile Send private message
bobef



Joined: 05 Jun 2005
Posts: 269

PostPosted: Mon Oct 01, 2007 7:47 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MiniD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group