--
You received this message because you are subscribed to the Google Groups "Harbour Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-devel/8ba8230a-fc09-4144-9412-4de5145d0740n%40googlegroups.com.
Hi
I don't agree that that behaviour is a bug, I consider the fact that it works as Enrico expects in xHarbour to be a bug.
This quote:
It can be used in applications as shorthand for
<aArray>[LEN(<aArray>)] when you need to obtain the
last element of an
array.
does not imply the behaviour he expects in my opinion.
Basically an expression cannot return a L-Value that can be assigned to unless it is a reference.
--
Regards
Alex
--
You received this message because you are subscribed to the Google Groups "Harbour Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-devel/8ba8230a-fc09-4144-9412-4de5145d0740n%40googlegroups.com.
Atail() returns last array, ok.
array may be allways as reference, ok.
But if element is not an array, it is not by reference.
a := { { 1,2}, { 3,4} }
b := Atail(a) // returns an array
b[ 2 ] := 10 // change value
? Atail( a )[ 2 ] // show 10
this is not the same as
a:= { 1,2,3,4,5}
b := Atail(a) // returns a number
b := 10 // do not change a array
? Atail( a ) // show 5
Do you make the test using Clipper?
José M. C. Quintas
--
You received this message because you are subscribed to a topic in the Google Groups "Harbour Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/harbour-devel/ZPvgH-Lt1sY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to harbour-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-devel/072eb811-5fae-c32f-783c-09290ce266de%40engwall.com.
a := { 1, 2, 3 }
Test( a )
? a[ 3 ] // return 10
FUNCTION Test( a )
a[ 3 ] := 10
RETURN Nil
Works like Test( @a ), but not exactly the same.
This do not occurs with another value type, only with arrays.
José M. C. Quintas
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-devel/CADMEX-WFfG7EmyugeWU7fWGD5wgDcGj-CVLoJ9DMgHZ%3DKRgL4w%40mail.gmail.com.