 |
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: 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. |
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: 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! |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 29, 2010 4:57 pm |
Yep, that's a bug in the new %dbkey function. Added to bug list.
|
|
|
|
 |
|
|
|