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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri May 28, 2010 6:15 am   

[3.18 Alpha]BUG?: a.1.2=blah fails
 
Not sure if this is a bug or not, but posting it in case it is. You mentioned that you can do @a1.a2.a3 or whatever for syntaxes now, so I attempted something on my end.

1. I opened up an untitled session.
2. On command line, I typed testdb.stuff=whatever
3. Database displayed a key of stuff and a value of whatever
4. I then did testdb.stuff.whatever=testing on the command line.
5. The result I got was unexpected (by me, anyway). It changed the key of stuff to 0 with the value whatever and made a new key of whatever with the value of testing.

It may seem silly, but I just want to test all angles to see what can be potentially broken.

Charneus
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri May 28, 2010 7:11 am   
 
I think I mentioned in my release post that nested assignments like this were not expected to work properly yet.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri May 28, 2010 7:48 am   
 
Right. The actual line says:
Quote:
However, trying to assign "nested" values, like "varname.1.key = value" won't work unless the intermediate nested object already exists. So this is still a bit klunky.


which insinuates that it works IF the nested key exists already, which, in my example, it does.

I assigned a key to whatever and attempted to change it via the testdb.stuff.whatever=testtwo syntax, but all it did was turn stuff into 0 and make a new key value of whatever with a value of testing (i.e. it would be #SAY {%db(@testdb, whatever)} or even #SAY {@testdb.whatever} instead of testdb.stuff.whatever).

Am I missing something here at all, then?

Charneus
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri May 28, 2010 7:56 am   
 
No, you are right, I should have been clearer that nested assignments like this are not yet working at all, even if the intermediate object already exists. Sorry. I just didn't get to the parser changes needed for that yet, so it will need to be in 3.19. Right now I'm more concerned about the stuff that used to work that is now broken.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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