Open cpyrgas opened 1 month ago
Chris, The first parameter of the assign is the value that gets assigned. The other parameters are the indices.
So
ASSIGN TestAssign(c1 AS LOGIC , c2 AS STRING, nValue AS INT) AS INT
declares an assign that expects a logical value and has 2 indices of type STRING and INT
The 'AS INT' at the end is ignored. Assigns do not have a return value.
To achieve what you, want the assign must be declared as:
ASSIGN TestAssign(iValue as INT, c1 AS LOGIC , c2 AS STRING, nValue AS INT) AS VOID
Robert,
Ah, sorry about that. I'm brain damaged, it's just too hot for too long..
I have added an error: error XS9128: Indexed properties cannot be declared with single line GET/SET Accessors.
There were some tests in the suite that were using single line indexed properties and failed, but I changed them to multiline and are ok now. I don't think this will affect many users (famous last words...), and it's easy to adjust the code anyway (with a descriptive error message), so confirmed fixed.
Nikos has code in the runtime that uses the single line syntax for index properties. This is valid code and should work. I'll reopen this to allow that variant.
The difference is that his code does not have empty GET and SET accessors, but there is indeed an expression inside the GET and SET accessors
Ahhh, OK, I will also revert back the tests then.
See inline for some issues with property/assign. I also think there is a mismatch with the order of arguments/parameters when defining/calling the assign in the wrong order, but the error XS1501 (no correct overload) hides this at the moment