"WITH" statement request
hippy
Posts: 1,981
Can we please have a WITH statement for dealing with object handles as Microsoft Visual Basic does, for precisely the same reason Visual Basic had it ?
It's much more elegant, clearer, and less to type to have -
than
I usually end up creating PRI routines for TxByte and RxByte for clarity and ease of use which then call the specific object's method, but that adds an extra layer of overhead which I don't particularly want.
It's much more elegant, clearer, and less to type to have -
PUB EchoLoop
repeat
with mySerialObject
.txByte( .rxByte )
than
PUB EchoLoop
repeat
mySerialObject.txByte( mySerialObject.rxByte )
I usually end up creating PRI routines for TxByte and RxByte for clarity and ease of use which then call the specific object's method, but that adds an extra layer of overhead which I don't particularly want.

Comments
Rgds,
John
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'