Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADDPROPERTY array
Message
 
 
À
23/04/2021 13:45:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01679967
Message ID:
01679974
Vues:
26
>>UPDATE. I found that I add the array to the oParameter as follows:
>>
>>ADDPROPERTY( oParameter, "attachment(2)", "DOC1.PDF" )
>>oParameter.attachment(2) = "DOC2.PDF"
>>
>>
>>Then to get the value from the oParameter, I would have to use:
>>
>>cValue1 = oParameter.attachment[1]
>>cValue2 = oParameter.attachment[2]
>>
>>
>>But I would need to know the number of elements in the array. Is passing the number of elements as another parameter the only way?
>
>You can still use ALEN() function or create a property on oParameter (Count);
>
>
>?ALEN(oParameter.attachment, 1)
>* or use
>ADDPROPERTY( oParameter, "Count", 2)
>
Thank you. I didn't know that ALEN() would work. Very good.
"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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform