Thanks for your feedbacks
1.
yes Fellippe has hit the center of my thinkings
Why does the parser colorize (recognize) Alias as Keyword and it doesn't restrict its name like it does for the other keywords?
2.
yes it is not a Qbasic behaviour in wich ALIAS is a language token
3.
yes it (alias) is a restrict keyword to use in restrict area so it is difficult to generate misunderstandment for parser/compiler :
3.1 in QB64 in DECLARE LIBRARY,
3.2 in QB45 in help I find this
DECLARE (Non-BASIC Procedure) Statement Details [ You are not allowed to view this attachment ]
Syntax 1
DECLARE FUNCTION name [CDECL] [ALIAS "aliasname"][([parameterlist])]
Syntax 2
DECLARE SUB name [CDECL] [ALIAS "aliasname"][([parameterlist])]
......
ALIAS Indicates that the procedure has another name in the
.OBJ or library file.
.........
like also here it is explained
https://qb64.org/wiki/DECLARE_(non-BASIC_statement)also if Alias has been restricted to a very little area it is forbidden as name of variable or of label.
4.
yes like Steve says it is logic that in TYPE ...END TYPE block Alias cannot be a keyword of QB64, but with the same logic also GOSUB cannot be a keywork of QB64 because in that block we can only define the list of variables of the TYPE wich we are building up
so i find not congruent the QB64 behaviour in this
TYPE c2
Alias as Integer
Gosub as Single
Long as Double
END TYPE
in specific the second line is not congruent with the third and the forth lines
because
4.1 if I must think about this like
DIM c2.Alias AS INTEGER, c2.Gosub AS SINGLE , c2.Long as DOUBLE
I should be able to write all these statements with no error from the parser/compiler...
4.2 if I must think about this like
DIM Alias AS INTEGER, Gosub AS SINGLE, Long AS DOUBLE
I shouldn't be able to write any of these statements with no error from the parser/compiler.
Copy and Paste in QB64 to do this experience...
Attachments are for those that don't want to copy an paste.