Lotus Notes FAQ Visit Our Sponsor!

How do you return custom data types in LotusScript?

From Greg_Prickril@lotus.com:


Declarations
Class ReturnObj
  Private m_stName As String
  Private m_stType As String
     
  Property Get NameVal As String
    NameVal = m_stName$
  End Property
     
  Property Get TypeVal As String
    TypeVal = m_stType$
  End Property
     
  Sub new( arg_stName$, arg_stType$ )
    m_stName = arg_stName$
    m_stType = arg_stType
  End Sub   
End Class

Function Test() As ReturnObj
  Set Test = New ReturnObj( "Name", "Type" )
End Function

Initialize
  Dim var
  Set var = Test()
  Msgbox( var.NameVal )


Applies to Notes Versions: 4 4.5 4.6 5
Last Modified: September 19, 1999