Maybe:
iCell1:=FunctionReturningArray()[1]
Dan
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/0bce28f6-43b6-4529-9bfb-89f37ae8a980n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Harbour Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/harbour-users/EuRbfhmI3TQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/2be991f8-848f-6082-8113-2a155ef00397%40appliserver.com.
Or else ...
AEVal( {
@iCell1,
@iCell2,
@iCell3}, {|a,ix| FunctionReturningArray()[ix] } )
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/CABTTX3TArYzF6-W9sePuXo0R%2BCx7_fnjaR%2BXq1tV4yPQdwrFog%40mail.gmail.com.
You forgot the assign.
Another option, because may be function can't be called more than
one time:
PROCEDURE Main
LOCAL a, b, c
//AEval( { @a, @b, @c }, { | a, nItem | a := MyArray()[ nItem ]
} )
hb_AUnpack( MyArray(), @a, @b, @c )
? a
? b
? c
Inkey(0)
RETURN
FUNCTION MyArray()
RETURN { 10, 20, 30 }
FUNCTION hb_AUnpack( aList, a, b, c, d )
IF ValType( aList ) != "A"
RETURN Nil
ENDIF
IF Len( aList ) > 0; a := aList[ 1 ]; ENDIF
IF Len( aList ) > 1; b := aList[ 2 ]; ENDIF
IF Len( aList ) > 2; c := aList[ 3 ]; ENDIF
IF Len( aList ) > 3; d := aList[ 4 ]; ENDIF
RETURN Nil
José M. C. Quintas
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/2ab624c7-f28f-1ec3-7e8c-3d71c4c1ed6c%40gmail.com.
Thanks José !
And if like this ...
PROCEDURE Main
LOCAL a, b, c, aA
AEval( { @a, @b, @c }, { | a, nItem | a := aA[ nItem ] },
(aA:=MyArray()), Len(aA) )
// hb_AUnpack( MyArray(), @a, @b, @c )
? a
? b
? c
Inkey(0)
RETURN
FUNCTION MyArray()
RETURN { 10, 20, 30 }
:-)
Alex
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/db616fd6-4588-8124-2316-7eb144161cdf%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/db616fd6-4588-8124-2316-7eb144161cdf%40gmail.com.
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/abe60fb9-8f81-486f-b570-40cd33dd4044n%40googlegroups.com.