Excuse me if what I am asking is, in fact, stupid but in FILE>EDITOR OPTIONS there is "Constant Color" option that does not seem to change any syntax colors.
I have always wondered what language elements does this coloring correspond to!
(I am talking about the IDE of the new version 1.56.)
John
Quote from: paravantis on December 14, 2006, 06:52:47 AM
Excuse me if what I am asking is, in fact, stupid but in FILE>EDITOR OPTIONS there is "Constant Color" option that does not seem to change any syntax colors.
I have always wondered what language elements does this coloring correspond to!
(I am talking about the IDE of the new version 1.56.)
John
John, this is from the EBASIC user guide.
Constants and literals
Constants are identifier to numeric mappings that cannot change value. Similar to variables in that they are referred to by name but don't actually use memory or generate any code. The compiler substitutes a constant identifier with its numeric identity or string literal at compile time. The three built in statements for defining constants are CONST,ÂÃ, SETID, and $DEFINE
The CONST statement creates traditional name to value mappings common in other languages. SETID is unique to the EBASIC language to create built in constants for the language accessed with the '@' operator. SETID constants are specially highlighted in the IDE and used throughout the command sets for built in function constants.
The $DEFINE operator is normally used to create a conditional identifier, but may also be used to create the same kind of constants that the CONST statement does. When using $DEFINE to create a constant the equal sign is not necessary.
Examples:
CONST WM_USER = 0x400
SETID "RTEDIT", 0x200
CONST ID_GAME = "Blaster Version 1.25"
CONST PI = 3.1415
$DEFINE ID_MENU 100
PRINT WM_USER, @RTEDIT, ID_GAME, PI
CONST allows basicÂÃ, math operations to calculate a numeric identity. Since the final result must resolve to a fixed numeric value you cannot use functions or variables when calculating constants. You can however use other constant identifiers in the calculations.
CONST WM_USER = 0x400
CONST MY_MESSAGE = WM_USER + 1
CONST MY_MESSAGE2 = MY_MESSAGE + 1
Steve,
That is what I thought too.
The problem is that the "Constant Color" found in FILE>EDITOR OPTIONS does NOT work! No matter what color I choose, no constants are highlighted in my code!
Am I the only one who is observing this behavior? Can other users report that the color they choose DOES in fact highlight their constants in the IDE?
John
Compiler constants. @HITWINDOW for example are colored by that setting.
Yep .. works OK here ..ÂÃ, can't say I like bright purple though .. :) :) :P
Graham
The default is an orange/brown. What monitor are you using?
Sorry Paul .. I was just being facetious .. I've set it back to Orange- Brown of course .. :)
Graham
Quote from: Paul Turley on December 14, 2006, 09:55:32 AM
Compiler constants.
Is there any way to make local constants defined with SETID appear highlighted?
Not currently. And the idea was to distinguish between constants that are built in so you don't try and redefine them.
Paul.