Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Wed Oct 05, 2011 3:13 am   

Nested #LOOPDB's
 
If you nest #loopdb's, %key and %val always point to the key/value pair of the inner loop. Is there a way to reference the key/value pair of the outer loop from within the inner loop?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Oct 05, 2011 3:23 am   
 
Probably not. Sounds like a new set of %1...%99 variables, though. At any rate, unless %key and %val contain residual values you could probably use local variables to store the outer values.
_________________
EDIT: I didn't like my old signature
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Wed Oct 05, 2011 3:49 am   
 
Yeah, that's the workaround I'm using, but I thought there might be something like %i, %j, %k, etc. for #LOOP's and #FORALL's. If there isn't, it's a feature request Very Happy.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net