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

March 2010

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 30 31      

Archives

Powered by Movable Type 4.34-en

Recent Comments

  • panandy: 3Q read more
  • Anonymous: philipz大 沒有邀請碼,無法註冊,致無法下載工具 請問有何方法可以解決? 感恩 read more
  • philipz: harushard, It is your java code problem. Check it and read more
  • harushard: java.lang.NoClassDefFoundError: Could not initialize class examples.ExamplesMCRFactory could you explain why read more
  • philipz: IM已經是無解了,建議可以用Plurk Api試看看。 read more
  • ann: hi,請問以上問題解決了沒?可以分享一下嗎? read more
  • Anonymous: 邀請碼沒有~無法下載工具~~怎麼辦 read more
  • Melody: test read more
  • philipz: Ginger: 您好,請您在我的噗浪上留言即可一起討論。 read more
  • Ginger: 版大您好: 在看過您做的期貨即時訊息BOT後覺得很不錯,自己也有一些想法不知能否與您交流與協助呢? 若您覺得ok的話,可以email或是噗浪(ID: king0355)與我聯繫。感謝 : ) read more

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.