Exent(foo1) not welcome here

Posted by jmls on 16-Feb-2011 14:51

My wierd bug for today

/* class foo */

CLASS foo:

     DEF PUBLIC PROPERTY bar AS CHAR NO-UNDO GET . SET .

END CLASS.

/* program a */

DEF VAR foo1 AS CLASS foo EXTENT NO-UNDO.

DEF VAR demo1 AS INT NO-UNDO.

EXTENT(foo1) = 5.

demo1 = EXTENT(foo1).

foo1[EXTENT(foo1)] = NEW foo().

foo1[EXTENT(foo1)]:bar = "you are not welcome here". /* this does not compile */

foo1[demo1]:bar = "come on in". /* this does */

the actual error for the line that does not compile is

Invalid unsubscripted reference to array element. (3531)

You must subscript array elements in WHERE clauses unless the reference is in a CAN-FIND in a VALIDATION expression of an array variable.

All Replies

Posted by Admin on 16-Feb-2011 15:11

foo1[EXTENT(foo1)]:bar = "you are not welcome here". /* this does not compile */

Interesting. Looks like this compiler has gotten way to complex to maintain.

Even adding parenthesis does not change anything. A UDF there is supported. I'd actually log this to tech support.

Posted by jmls on 16-Feb-2011 15:21

woot!

On 16 February 2011 21:11, Mike Fechner

This thread is closed