Function declaration syntax

Function declaration syntax

Anonymous
Not applicable
378 Views
2 Replies
Message 1 of 3

Function declaration syntax

Anonymous
Not applicable
Is there a syntactically correct way to do something like this?:

Dim Pnt(0 To 2) As Double
Dim myEntity As AcadEntity

Public Function FindPt(ent As AcadEntity)(0 To 1) As Double
.
.
.
End Function

Pnt = FindPt(myEntity)


or do I have to have the funtion return a Variant? If I do then it seems I get a type mismatch.
0 Likes
379 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
You need to return a variant.

> or do I have to have the funtion return a Variant? If I do then it
> seems I get a type mismatch.

Post the code.


- Jose

jimboh <> wrote in news:[email protected]:

> Is there a syntactically correct way to do something like this?:
>
> Dim Pnt(0 To 2) As Double
> Dim myEntity As AcadEntity
>
> Public Function FindPt(ent As AcadEntity)(0 To 1) As Double
> .
> .
> .
> End Function
>
> Pnt = FindPt(myEntity)
>
>
> or do I have to have the funtion return a Variant? If I do then it
> seems I get a type mismatch.
0 Likes
Message 3 of 3

Anonymous
Not applicable
> You need to return a variant.

Definitely NOT! Return an array of Doubles -> As Double()

-- Mike
___________________________
Mike Tuersley
___________________________
the trick is to realize that there is no spoon...
0 Likes