Hi,
During the translation of some of my libraries from mP to mB I discovered that a number of variable names give the error "invalid identifier", while these names are accepted in mP as variable identifiers.
The identifiers which I discovered to be invalid were (o.a., list is not exhausting):
System, Command, Dir, Asc, Stop (while "start" is accepted), FileAttr, Sqr, Line, Int, Base, Version, Clear, CurDir and WeekDay.
Furthermore these identifier names are not present in the list of "Reserved words".
Why the difference between mB and mP? Or did I do something wrong?
Thanks in advance.
Keywords (reserved words) differ from mikroPascal?
Keywords (reserved words) differ from mikroPascal?
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
- darko.minic
- Posts: 747
- Joined: 01 Dec 2014 11:10
Re: Keywords (reserved words) differ from mikroPascal?
Hello Dany,
Although Basic and Pascal is quite similar, there is some differences, as you can notice in reserved words.
You can see whether words is reserved in your compiler, for example:
If you type Command in your compiler, Command will appear in bold type, that means that word is reserved.
Certainly I will try to investigate why these specific words are not present in the list of "Reserved words".
Regards,
Darko
Although Basic and Pascal is quite similar, there is some differences, as you can notice in reserved words.
You can see whether words is reserved in your compiler, for example:
If you type Command in your compiler, Command will appear in bold type, that means that word is reserved.
Certainly I will try to investigate why these specific words are not present in the list of "Reserved words".
Regards,
Darko
Re: Keywords (reserved words) differ from mikroPascal?
Wouldn't it make more sense to check if these words need to be reserved? Also verifying present list of "Reserved words" wouldn't hurt as it already seems rather abundant compared to compiler needs.darko.minic wrote:Certainly I will try to investigate why these specific words are not present in the list of "Reserved words".
- darko.minic
- Posts: 747
- Joined: 01 Dec 2014 11:10
Re: Keywords (reserved words) differ from mikroPascal?
Hello,
We will certainly update our list of "Reserved words".
@Janni
I will forward your suggestion to Software Department so they can consider if these words need to be reserved.
Regards,
Darko
We will certainly update our list of "Reserved words".
@Janni
I will forward your suggestion to Software Department so they can consider if these words need to be reserved.
Regards,
Darko
Re: Keywords (reserved words) differ from mikroPascal?
Thank you Darko. It would be nice to have this solved as it's almost 10 years since it has started to bother mB users (see here for example) and the question whether all reserved keywords are necessary was posted many times for all compilers.
@Dany: It seems that keywords were successively added to reserved list just because they're highlighted by the third-party component mE uses in Code Editor. Hence all the keywords that belong to object oriented languages (and even some historical garbage like 'circle' in mB) .
@Dany: It seems that keywords were successively added to reserved list just because they're highlighted by the third-party component mE uses in Code Editor. Hence all the keywords that belong to object oriented languages (and even some historical garbage like 'circle' in mB) .
Re: Keywords (reserved words) differ from mikroPascal?
Ai. What a waste! Thanks Janni.janni wrote:@Dany: It seems that keywords were successively added to reserved list just because they're highlighted by the third-party component mE uses in Code Editor. Hence all the keywords that belong to object oriented languages (and even some historical garbage like 'circle' in mB) .
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)