Symbols to define string constants

inglewoodpete

Senior Member
Can the Programming Editor be modified to accept string constants defined via a Symbol command/directive?

Example: I have a couple of different 2 x 16 LCDs which have different ASCII sequences to describe common actions like <Carriage Return>. Life would be so much simpler if I could define the sequence in a Symbol:

Code:
Symbol MyCR = "?n"   'Defined as a string
this would allow an alternate definition, when required, for the other display:
Code:
Symbol MyCR = CR     'Defined as the system numeric (13)
This would allow a conditional definition to be included, depending on the LCD selected.

Code:
SerOut 1, T2400, ("Hello", MyCR)
The string definition could also overcome the problem of referencing the PortA and PortC pins:

Code:
Symbol DataPin = "PortC 1"

High DataPin
Edited by - inglewoodpete on 06/08/2007 06:46:37
 
Last edited:
Top