Programming
86
NetLinx Studio (v2.4 or higher)
Use chroma-coding to make your code easier to read and manage. For example, you could chroma-
code all comments to yellow, all identifiers to red and strings to blue to make them more easily
identifiable in your code file.
The text elements that can be chroma-coded, and their default color assignments are listed below:
AutoComplete and AutoSuggest
You may enable or disable this feature by toggling the Enable AutoComplete/AutoSuggest
checkbox in the Editor tab of the Preferences dialog.
With this option enabled, the Editor can automatically complete typing many common and standard
programming terms for you. When you begin typing in the editor, a drop-down list of probable
matches for the term you started typing is displayed.
Auto-Suggest will suggest a single word if that word matches something that has already
been typed.
Auto-Suggest will drop the rest of the word that has been typed (to the right of the cursor)
when a suggestion is selected.
Use the scroll bar to scroll through the list (if necessary) and click to select the desired
term or phrase that you want to insert at the cursor's position.
Double-click or press the Tab key (or Enter on your keyboard) to insert the selection.
In the example below (FIG. 12), the user has typed the character "D", and is selecting to insert the
phrase "DEFINE_EVENT" into the code. The selection always replaces the character(s) typed
before the AutoComplete/AutoSuggest drop-down was invoked.
Note that AutoComplete/AutoSuggest is case-sensitive. Typically section headings are
capitalized, and commands are not.
Use the Edit > Rescan Current Source File option to rescan the active file, in order to
rebuild the symbol information utilized by the AutoComplete/AutoSuggest feature.
Comments
green
Default Text
red
Floating Point Number
dark green
Language Reserved Word
blue
Number
teal
Operator
red
Note
: All of the following color as operators: =, <, >, +, -, *, /, %, <=,
>=, <>, AND, OR, XOR, NOT, BAND, BOR, BXOR, BNOT, &&, ||, ^^,
!, &, |, ^, ~
String
maroon
FIG. 12
Autocomplete And Autosuggest example
Summary of Contents for NETLINX STUDIO V2.4
Page 1: ...instruction manual Software NetLinx Studio v2 4 or higher ...
Page 16: ...NetLinx Studio v2 4 or higher 4 NetLinx Studio v2 4 or higher ...
Page 32: ...The NetLinx Studio v2 4 Work Area 20 NetLinx Studio v2 4 or higher ...
Page 44: ...Working With Workspace Files 32 NetLinx Studio v2 4 or higher ...
Page 88: ...Working With Systems and System Files 76 NetLinx Studio v2 4 or higher ...
Page 118: ...Programming 106 NetLinx Studio v2 4 or higher ...
Page 152: ...Working With Online Devices 140 NetLinx Studio v2 4 or higher ...