Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WITH object
Message
De
14/11/2019 15:12:53
 
 
À
14/11/2019 12:12:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01671871
Message ID:
01671877
Vues:
80
I haven't tested, but would like to know what This is inside a With-Endwith construct. IOW
WITH xyz.abc
    SomeFunction(this, 1, 2)
ENDWITH
>The equivalent of:
>
WITH xyz.abc
>    SomeFunction(xyz.abc, 1, 2)
>ENDWITH
>
>But without having to retype "xyz.abc" by being able to use something like "." which works without syntax error, by the way, but doesn't pass anything in.
>
>
WITH xyz.abc
>    SomeFunction(.)
>    SomeFunction(@.)
>ENDWITH
>
>Both of those compile without error, but don't pass in any reference. It's as though you used SomeFunction() with zero parameters as PCOUNT() reports 0.
>
>
WITH xyz.abc
>    SomeFunction(., 1, 2)
>    SomeFunction(@., 1, 2)
>ENDWITH
>
>But neither of those work. Both generate an error.
>
>>I'm not sure what you want but:
>>
>>WITH xyz.abc
>>    SomeFunction(.Width, 1, 2)
>>ENDWITH
>>
>>
>>>Is there a way to access the WITH object here without re-typing it?
>>>
>>>Something like:
>>>
WITH xyz.abc
>>>
>>>    SomeFunction(thisWith, 1, 2)
>>>
>>>ENDWITH
>>>
>>>
>>>
>>>FUNCTION SomeFunction
>>>LPARAMETERS toWith, tnRow, tnCol
>>>
>>>    ? (toWith == xyz.abc)
>>>    * Displays .T.
>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform