Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Type foo
- Declare Constructor ( n As Integer )
- Declare Destructor
- As Integer v = &Hbaadc0de
- End Type
- Type bar extends foo
- Declare Constructor ( n As Integer )
- Declare Destructor
- Declare Operator Cast As string
- End Type
- Constructor foo ( n As Integer )
- Print "foo.ctor( n )"
- v = n
- End Constructor
- Destructor foo
- Print "foo.dtor"
- v = 0
- End Destructor
- Constructor bar ( n As Integer )
- Print "bar.ctor( n )"
- v = n
- End Constructor
- Destructor bar
- Print "bar.dtor"
- End Destructor
- Operator bar.cast As String
- Print "bar.cast"
- Return "0x" & hex( v, 8 )
- End Operator
- Dim As bar Ptr pbar = New Bar ( 5 )
- If( pbar = 0 )Then
- Print "bar.ctor error"
- EndIf
- Print *pbar
- Delete pbar
- Sleep
- End
Add Comment
Please, Sign In to add comment