View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] tfischer@mad.scientist.com is offline
external usenet poster
 
Posts: 3
Default Declaring Data Type of Array

Hello,

thanks a lot for your quick and very helpful responses!
There are still two things I am struggling with:

1)

I want to do this:

v = Array()
ReDim v(2)
v(0) = Array(0, 0, 0)

But I cannot see a way to declare the values at the level
of v(0)(0) as Single, Double, etc.

2)

In the following code I dimension an Array of doubles as
suggested.


Sub Main()
Dim foo(0 To 3) As Double
foo = bar()
End Sub


Function bar() As Double
bar = Array(0.1, 0.2, 0.3)
End Function


But I am getting a 'Can't assign to variable' error. If I
can return an array, why is it not possible to assign it
as such?

Your help is very much appreciated!
Tom