Difference between revisions of "Sys SyntaxColors"

(Created page with "This system variable is a two dimensional table that you can edit to control syntax coloring in expression fields such as definitions in object windows and in the attribute pa...")
 
Line 1: Line 1:
 
This system variable is a two dimensional table that you can edit to control syntax coloring in expression fields such as definitions in object windows and in the attribute pane. This is indexed by [[Sys TokenType]] and [[Sys RedGreenBlue]]. The table is stored in the registry and read from there at startup. Any editing changes you make will update the registry, if these changes are valid.
 
This system variable is a two dimensional table that you can edit to control syntax coloring in expression fields such as definitions in object windows and in the attribute pane. This is indexed by [[Sys TokenType]] and [[Sys RedGreenBlue]]. The table is stored in the registry and read from there at startup. Any editing changes you make will update the registry, if these changes are valid.
  
Here is the table with initial values:
+
Here is the table with initial default values:
  
                        red       green blue
+
[[image:syntax colors.png]]
comments 0       255         0
+
text literals 255       0         0
+
keywords 0       0       255
+
variables 191       0       191
+
identifiers 127       0       127
+
  
 
The row and column headers are not editable, and you cannot add any rows or columns. Only the data cells can be changed, and these cells only allow integer values between 0 and 255, inclusive. Any other values will cause an error and you will get an error popup explaining these rules and suggesting that you correct your error. If you say yes, go back to editing, the edit table will revert back to was it was before.
 
The row and column headers are not editable, and you cannot add any rows or columns. Only the data cells can be changed, and these cells only allow integer values between 0 and 255, inclusive. Any other values will cause an error and you will get an error popup explaining these rules and suggesting that you correct your error. If you say yes, go back to editing, the edit table will revert back to was it was before.
  
The rows give the RGB components of the colors used in expression fields for various syntactic categories.
+
The rows give the RGB components of the colors used in expression fields for various syntactic categories. Here are the categories:
 +
 
 +
comments - Analytica comments, of the forms /* comment text */ or { comment text }
 +
 
 +
text literals - strings enclosed in quotes, of the forms '[text ' or " text "
 +
 
 +
keywords - reserved words in Analytica such as if, then, else, do, local, etc.
 +
 
 +
variables - these are words that are not keywords and not declared variables and not identifiers of any Analytica nodes or functions; by default, these are lighter colored than identifiers and help you spot typos from failing to type resolved names correctly or else spot intended names that you typed before having actually defined them
 +
 
 +
identifiers - these are declared variables or else resolved identifiers of Analytica nodes or functions
 +
 
 +
Note that syntax coloring is continuously updated as you type into expression fields.

Revision as of 20:40, 12 February 2020

This system variable is a two dimensional table that you can edit to control syntax coloring in expression fields such as definitions in object windows and in the attribute pane. This is indexed by Sys TokenType and Sys RedGreenBlue. The table is stored in the registry and read from there at startup. Any editing changes you make will update the registry, if these changes are valid.

Here is the table with initial default values:

Syntax colors.png

The row and column headers are not editable, and you cannot add any rows or columns. Only the data cells can be changed, and these cells only allow integer values between 0 and 255, inclusive. Any other values will cause an error and you will get an error popup explaining these rules and suggesting that you correct your error. If you say yes, go back to editing, the edit table will revert back to was it was before.

The rows give the RGB components of the colors used in expression fields for various syntactic categories. Here are the categories:

comments - Analytica comments, of the forms /* comment text */ or { comment text }

text literals - strings enclosed in quotes, of the forms '[text ' or " text "

keywords - reserved words in Analytica such as if, then, else, do, local, etc.

variables - these are words that are not keywords and not declared variables and not identifiers of any Analytica nodes or functions; by default, these are lighter colored than identifiers and help you spot typos from failing to type resolved names correctly or else spot intended names that you typed before having actually defined them

identifiers - these are declared variables or else resolved identifiers of Analytica nodes or functions

Note that syntax coloring is continuously updated as you type into expression fields.

Comments


You are not allowed to post comments.