This will work, when the compiler replaces a constant with its value, it then searches the line for constants again and will make any more replacements needed. It will do this up to 100 times on a line, then it will stop replacing and show an error. (This to prevent something like "#define Const_A Const_B" and then "#define Const_B Const_A" from causing an infinite loop in the compiler.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello again ...
Would this be OK :
#Define Inp_clavier_mode Pind
#Define Mode_beeper ((Inp_clavier_mode & 0xc0) = 0x40)
.
.
If (Mode_beeper) Then
...
It compiles without error ; but will it work the same way ?
Thanks in advance ...
Last edit: Bertrand BAROTH 2019-04-25
This will work, when the compiler replaces a constant with its value, it then searches the line for constants again and will make any more replacements needed. It will do this up to 100 times on a line, then it will stop replacing and show an error. (This to prevent something like "#define Const_A Const_B" and then "#define Const_B Const_A" from causing an infinite loop in the compiler.)
Thanks, this makes my source text easier to read ...
I will update the Help with these insights.
See https://github.com/Anobium/Great-Cow-BASIC-Help/blob/master/source/define.adoc