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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Lor
Beginner


Joined: 27 Jan 2005
Posts: 11

PostPosted: Wed Jul 20, 2005 1:09 am   

Strange Behavior: (#WHILE/#DBFIRST) and (#LOOPVIEW)
 
Using Zmud 7.13a
One db, up on top, "ALL" view
Has a "Name" Field


(1) The iteration command given in the helpfile (and several places on this board) has a very strange behavior when I use it.
Code:
#DBFIRST;#WHILE (!%null(%rec)) {#show &Name;#DBNEXT;};

Shows the first Name 'x' times (x being the number of records), yet I can see the selected record iterating over the entire db.

If I
Code:
#DBFIRST;

then repeatedly
Code:
#show &Name;#DBNEXT

then all the Names are shown, as one would expect.

(2) Regarding #loopview.
Depending on the record that I choose before I use
Code:
#LOOPVIEW{#show &Name}

then I see the &Name of that record for that particular record 'x' times.


I thank you for any insight you may be able to provide.
Reply with quote
Lor
Beginner


Joined: 27 Jan 2005
Posts: 11

PostPosted: Fri Jul 22, 2005 9:32 pm   
 
I'm shamed that it was this easy, but posting here for other's reference.

From zugg:

In (1), make sure you turn OFF the "Expand Vars" option in your
preference. What is happening is that zMUD is expanding the entire
command line at the time you enter it. So, the "#SHOW &Name" command is
getting immediately expanded to "#SHOW Dave". Then this gets executed
repeatedly. Turning off Expand Vars will prevent this immediate
variable expansion. Or, if you put that command into an Alias and then
execute the alias then it will work.

Same issue in (2).

Zugg
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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