The following statement uses relvar reading from my electricity database:
begin;
var t array tuple same_heading_as(reading);
load t from reading order(desc Year, desc Month#);
output t(1);
end;
The output statement gives a syntax error say the operator(integer) doesn't exist, but it conforms to this BNF:
<tuple nonwith exp>
::= <tuple var ref>
| <tuple op inv>
| <array var ref> ( <subscript> )
| ( <tuple exp> )
Can't reference an array element.
-
- Posts: 126
- Joined: Sat May 24, 2008 4:49 pm
Re: Can't reference an array element.
I've just found it's not exactly a bug, but rather a deviation from Tutorial D, and one I personally approve of!
Rel follows common practice these days in using square brackets instead of parns. t[1] worked fine.
Hugh
Rel follows common practice these days in using square brackets instead of parns. t[1] worked fine.
Hugh