With - End with

scrat

Active Member
Licensed User
Longtime User
Is it possible to have a with / End With statement such in Pascal

I am a bit lazy

Thanks
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
I second this request (in fact I also asked for it in B4PPC), but not because I'm lazy, I just think that it looks tidier :cool:

Regards,
RandomCoder
 

NeoTechni

Well-Known Member
Licensed User
Longtime User
Agreed. I love this in VB6.

How to do it in the pre-processor:
If a variable starts with a . instead of a name, just but the with'd variable in front.
 

zouriteman

Member
Licensed User
Longtime User
also

+1

it is nice WITH .... END WITH , to prefix without repetition.


The VB6 formula is very good , replacing

ListView1.Top = 123
ListView1.Left = 11

by

with ListView1
.Top = 123
.Left = 11
end with
 
Top