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
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Tue Jun 29, 2010 10:09 am   

[321B] %dbkey function possible indexing anomaly.
 
Code:

test = ""
;;
#CALL %vartype( test, 5)
;;
#ADDKEY test {keyA=valA}
;;
#PRINT {%dbkey( @test, 0)}
;;
#PRINT {%dbkey( @test, 1)}

The first #PRINT outputs keyA to the screen.
The second outputs nothing.

I am just pointing this out. The indexing is not what one would expect from the way the other CMUD functions that use indexing opearate where the minimum index is 1.
_________________
Sic itur ad astra.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Jun 29, 2010 1:45 pm   
 
It took me a second to figure out what this was about. You're saying that for most CMUD functions the indexing list starts at 1, for example %item but dbkey starts at 0. I vaguely recall this being mentioned in the forums quite some time back. We'll be sure to make sure this difference gets documents.
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Jun 29, 2010 4:57 pm   
 
Yep, that's a bug in the new %dbkey function. Added to bug list.
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