It gives a segfault if the default value is an empty string, and I try to
do anything with that string (Printing or assigning).
Try this code:
---- test.bas ----
Type TypeA
v As String
Declare Constructor(v As String = "")
End Type
Constructor TypeA(v As String)
'' Comment this out and no segfault occurs.
Print v
End Constructor
Print "Declare"
Redim Shared iplist() As TypeA
Print "Size"
Redim iplist(1 to 2) As TypeA
Print "End"
---- End File ----
André Victor T. Vicentini
compiler
None
Public
|
Date: 2009-09-10 06:39 Hmm, it seems to be passing a reference to an integer with a value of 1 |
|
Date: 2009-09-09 20:39 One way to get around the issue, is to use to use two separate constructors |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use