Otto,
Otto Christiaanse wrote:Robert van der Hulst wrote:Some reserved words are also allowed as identifier. Union is not. At this moment UNION is in our 'VO keywords' list which is not allowed as identifier. You will have to prefix Union with @@ to make this work.,
I will move Union to the list of keywords that can be used as identifier, as well as Event (which is often used in VO event handler code).
Any other suggestions ?
Robert
Does the problem disappear if the code is case sensitive? UNION as keyword, Union as method.
Yes case sensitivity would make things much easier.
However this problem will be solved anyway in the version of X# that will be released this week. I have moved the following keywords to the list of keywords that can also be used as identifiers:
ALIGN, CALLBACK, CLIPPER, DECLARE, DEFINE, DELEGATE, DIM, DOWNTO, DLLEXPORT,
ENUM, EVENT, FASTCALL, FIELD, FUNC, GLOBAL, IN, INHERIT, INSTANCE, INTERFACE,
OPERATOR, PASCAL, PROC, PROPERTY, SEQUENCE, STEP, STRICT, STRUCTURE, THISCALL,
UNION, UNTIL, UPTO, USING, VOSTRUCT , WINCALL
This may lead to confusion when typing, especially if you trust the colors inside the editor.
For example: if you start typing the keyword FUNC
- func1.png (4.73 KiB) Viewed 536 times
Then it will be black (identifier) but after you add the name of the function then it will become Blue
- func2.png (12.06 KiB) Viewed 536 times
Some keywords are difficult to be allowed as identifier, because they appear alone on a line and the parser will not know if the word TRY on a line means the beginning of a try statement or a variable with the name TRY.