Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WITH object
Message
From
14/11/2019 15:12:53
 
 
To
14/11/2019 12:12:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01671871
Message ID:
01671877
Views:
82
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.
>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform