Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to understand ASCAN()
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Need to understand ASCAN()
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01302521
Message ID:
01302521
Vues:
62
Could someone explain why the following does not find an element?
LOCAL ARRAY aTest[6,2]
aTest[1,1] = "abc"
aTest[1,2] = "123"
aTest[2,1] = "abc"
aTest[2,2] = "XXX"
aTest[3,1] = "abc"
aTest[3,2] = "123"
aTest[4,1] = "abc"
aTest[4,2] = "XXX"
aTest[5,1] = "abc"
aTest[5,2] = "1233X"
aTest[6,1] = "abc"
aTest[6,2] = "XXX"

nEle = ASCAN( aTest, "XXX", 9, -1, 2, 0 )

WAIT WINDOW " found XXX in elem " + ALLTRIM(STR( nEle ))

*-- The nEle returned in 0
I thought that above expression should look for value "XXX" in the second column of two-dimensional array, starting with element 9. I thought it would find the element aTest[6,2] but it does not.

What am I missing?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform