|
|
| Author |
Message |
DH* Guest
|
|
Posted: 07 May 2006, 14:11 PM Post subject: underscore in in-line block data initialization |
|
|
| This doesn't appear to work. I still get errors when I try it. |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2593
Location: Portland, OR
|
|
Posted: 07 May 2006, 16:14 PM Post subject: |
|
|
As documented, the continuation underscore must be preceded by at least one space or tab, both in regular code and in in-line initializers.
Can you provide an example that does not work? Here is a working example:
| Code: | Dim bd as ByteVectorData({ 0, 1, _
2, 3, 4, _
5
})
Sub Main()
Debug.Print CStr(bd(2))
End Sub |
|
|
| Back to top |
|
 |
DH* Guest
|
|
Posted: 07 May 2006, 17:08 PM Post subject: |
|
|
Both examples below result in errors. The second is my preferred construction.
| Code: | Public months As New StringVectorData({"JAN","FEB","MAR","APR","MAY","JUN", _
"JUL","AUG","SEP","OCT","NOV","DEC"})
Public months As New StringVectorData({"JAN","FEB","MAR","APR","MAY","JUN", _
"JUL","AUG","SEP","OCT","NOV","DEC"}) |
|
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2593
Location: Portland, OR
|
|
Posted: 07 May 2006, 18:29 PM Post subject: |
|
|
| Quote: | | Both examples below result in errors. | Thanks. In most cases, having a test case that demonstrates a problem is substantially more useful than a general statement about something not working correctly.
The cause of the problem has been identified and resolved. |
|
| Back to top |
|
 |
DH* Guest
|
|
Posted: 07 May 2006, 19:30 PM Post subject: |
|
|
| dkinzer wrote: | | Quote: | | Both examples below result in errors. | Thanks. In most cases, having a test case that demonstrates a problem is substantially more useful than a general statement about something not working correctly. |
In this case, the example is the same one I gave a couple of weeks ago when I first reported that the underscore didn't work in these block data initializations so I assumed you would recall it. |
|
| Back to top |
|
 |
|