February 2007 Archives

Here is a derived class called MyClass2 that uses the base class MyClass1:
Class MyClass1 ' Base class.
a As Integer
Public c As Integer
'...
End Class

Class MyClass2 As MyClass1 ' Class derived from MyClass1.
b As Integer
Public d As Integer
'...
End Class
Dim x As New MyClass ' Object x has members
' a%, b%, c%, and d%.
x.c% = 12
x.d% = 35

Then, Polymorphism, in my eyes, LotusScript does not support polymorphism or overloading.

How to Handle Errors on LotusScript

Function test(param1 As String) As Integer
Test = False
On Error Goto errorhandler
' do something here!
Test = True
exitFunction:
Exit Function
errorhandler:
Call raiseError()
Resume exitfunction
End Function

Function raiseError() As Integer
raiseError = False
' Remember. No error trapping here!
Print "Run time error: (" & Cstr(Err) & ":" & Error$ & " at line: " & Cstr(Erl)
raiseError = True
Exit Function
End Function

Function raiseError() As Integer
raiseError = False
Print "Run time error: (" + Cstr(Err) & ":" & Error$ & " at line: " & Cstr(Erl) & _
" called from: " & Getthreadinfo(11) & " in module: " & Getthreadinfo(10)
raiseError = True
End Function

February 2012

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Archives

Powered by Movable Type 4.34-en

About this Archive

This page is an archive of entries from February 2007 listed from newest to oldest.

November 2006 is the previous archive.

March 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.