I am implementing some DDT statements, this in particular:
ARRAY SCAN INCLIBS(0) FOR (Comp.CurSystInc+1), = LibName, TO Index
When converted, PluriBASIC generates a macro called ?ArrayScanString and it is invoked like this:
?ArrayScanString(-16, inclibs, 0, (EXE.lng(@comp, 6393) + 1), null, null, null, null, =, libname, index, Err)
I believe the syntax is correct, but at compilation Oxygen complains about this:
ERROR: ERROR: Undefined Symbol: @
WORD: 0
IN: add_systinc
LINE: 14902
FILE: "main source
There are no @ symbols inside the macro, so, i am guessing the parameter (EXE.lng(@comp, 6393) + 1) is not being interpreted correctly.
When removing the brackets, so that it gets genrated like this:
?ArrayScanString(-16, inclibs, 0, EXE.lng(@comp, 6393) + 1, null, null, null, null, =, libname, index, Err)
Oxygen says:
ERROR: ERROR: not defined
WORD: ?iend
IN: add_systinc
LINE: 14902
FILE: "main source
I suppose it refers to either of these lines inside the macro:
...
int ?iEnd = 0
if istart = null then
?iStrt = a.lbound(1)
else
?iStrt = istart
end if
if ifor = null then
?iEnd = a.ubound(1)
else
?iEnd = ?iStrt + ifor
end if
For ?index1 = ?iStrt to ?iEnd
For ?index2 = ?iStrt to ?iEnd
...
Is the parameter being interpreted wrong?