> I'm trying to EQUATE some data names that exist in my source
> code to equivalent dynamic array references in OpenQM.
> Here is a specific example:
>
> EQUATE TRLESSOR.NAME TO TRLESSOR.R<2>
>
> It appears to me that this is syntactically correct but yet returns
> error 2831, "Unrecognised statement".
> Can anyone here shed any light on why this won't compile?
This should work ok. I have actually just tested this exact statement in a
program here.
Is line 2831 this equate statement or some use of it?
Is TRLESSOR.R itself an equated token?
> (BTW, I'm assuming there is a typo in the docs, because the docs say:
>
> EQUATE name TO dyn.array(field {, value {, subvalue}}>
>
> which would require me to say:
>
> EQUATE TRLESSOR.NAME TO TRLESSOR.R(2>
Whoops! This is indeed a typo and has been fixed for the next release (this
week if all goes to plan).
Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200
>
> Hi!
>
> I am new to OpenQM and just starting to get my feet wet. Hopefully I
Welcome to the Zoo Gary!
>
> EQUATE TRLESSOR.NAME TO TRLESSOR.R<2>
>
> It appears to me that this is syntactically correct but yet returns
> error 2831, "Unrecognised statement".
> Can anyone here shed any light on why this won't compile?
>
> (BTW, I'm assuming there is a typo in the docs, because the docs say:
>
> EQUATE name TO dyn.array(field {, value {, subvalue}}>
>
As far as I know, EQU/EQUATE doesn't work with dynamic arrays, only static
arrays such as the result of a MATREAD.
I checked my D3 documentation and it only specifies static array
parameters. I checked with a little example to make sure:
0001 x = ""
0002 x<1> = "a"
0003 equate foo = x<1>
0004 crt foo
Line #3 generates a compile error under D3 as well as OpenQM/SDME
I strongly suspect that the documentation is in error.
g.
--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://www.scarletdme.org - Get it _today_!
>
> Hi Gary,
>
>> I'm trying to EQUATE some data names that exist in my source
>> code to equivalent dynamic array references in OpenQM.
>> Here is a specific example:
>>
>> EQUATE TRLESSOR.NAME TO TRLESSOR.R<2>
>>
>> It appears to me that this is syntactically correct but yet returns
>> error 2831, "Unrecognised statement".
>> Can anyone here shed any light on why this won't compile?
>
> This should work ok. I have actually just tested this exact statement in a
> program here.
>
It might work ok under the version you're using, but under 2.6-6 it
generates a compiler error.
1 * test of EQUATE
2
3
4 foo = ""
5 foo<1> = "a"
6 foo<2> = "b"
7 foo<1,3> = "c"
8
9 dim bar(2)
10 bar(1) = "x"
11 bar(2) = "y"
12
13 equate test.a to foo<1>
14 equate test.b to bar(1)
15
16 display "test.a ":test.a
17 display "test.b ":test.b
18
19 end
20
21
The following program generates a compile error on line 13:
Compiling BP TEST
*
13: Unrecognised statement
*
1 error(s)
Compiled 1 program(s) with errors in:
TEST
(and in my D3 test program, I mistakenly used a "=" instead of "TO", but
the compile still fails when it's corrected)
What version were you checking that example against Martin?
> It might work ok under the version you're using, but under 2.6-6 it
> generates a compiler error.
It is probably one of the things fixed in the complete rework of equate
tokens in 2.6-10.