[Info-vax] BASIC (and Horizon)

Lawrence D'Oliveiro ldo at nz.invalid
Wed Jan 31 16:24:14 EST 2024


On Wed, 31 Jan 2024 10:20:35 -0500, Arne Vajhøj wrote:

> For the not VB.NET knowledgable:
> 
> Using o1 As New X("A")
>      ...
> End Using
> 
> calls o1.Dispose() when the block is exited no matter how it is exited -
> normal or exception does not matter Dispose is always called.

Python has “context managers” which are a generalization of this. It also 
has “try/finally” blocks, which are good for one-off cases.



More information about the Info-vax mailing list