Page 1 of 1
XIDE and capitalization of words
Posted: Wed Apr 22, 2020 7:37 am
by Karl-Heinz
Hi Chris,
Is it possible to switch off the auto capitalization of e.g. the word "DATE" ?
When the compiler switch /cs is set and i want to use the function "Date()" there´s no chance to compile the code because "Date()" is always automatically changed to "DATE()".
regards
Karl-Heinz
XIDE and capitalization of words
Posted: Wed Apr 22, 2020 8:00 am
by Chris
Hi Karl-Heinz,
You can prefix it with @@ as in @@Date() and the editor will not touch it (the compiler will be fine with it as well). But I can also add an option in keywords.cfg to specify keywords that you do not want to be treated as keywords, in addition to bein able to specify "new" keywords. Will look into it.
XIDE and capitalization of words
Posted: Wed Apr 22, 2020 3:55 pm
by Karl-Heinz
Hi Chris,
A solution might be to add a section e.g. [IGNORE] to the Keywords.cfg, so a entry might look like:
Code: Select all
; Add words to be treated as keywords
; each keyword in separate lines, in Proper form (MyNewKeyword)
;Wait
;Use
[IGNORE]
DATE
regards
Karl-Heinz
XIDE and capitalization of words
Posted: Wed Apr 22, 2020 5:11 pm
by Chris
Yeah, that's exactly what I thought of as well
XIDE and capitalization of words
Posted: Fri Apr 24, 2020 6:57 am
by mainhatten
Partially off topic: One of the not-enough-cherished gems of vfp is the "simple" beautify.app, which reformats source code to a certain set of standards. Almost everyone has a very own idea how code should look, esp. if many elements like spacing, capitalization and so on are not set in stone by the language itself. "Innocent" editing might add a difference in spacing or capitalization, which gets flagged when diffing in SourceControl, and then there are some who take pride in reformating long SQL statements or "column aligning" parts of sources after first letter of line... Integrating Beautify with a defined standard of settings into the Check-In process of SourceControl calmed most developers down and removed false positives from diffing - a win-win.
I have grown to like ":" for xSharp member access and ":=" for assigns feels good to me from Pascal and Modula II years of coding - but this will not compile in vfp. Global search and replace works, but incurs the danger of changing chars inside strings which should not be changed. ILSpy does recompile to the functions "behind" xBase commands, not the code first fed to xBase compiler. Is there a chance to pipe out sources during parsing or compiling with member accessor ":" or ".", alias accessor "->" or "." and assign operator ":=" or "." set to specific wishes ?
And perhaps integrate with something similar to Beautify.App ? Clearly less important compared to SQL on Tables or working CursorAdapter, but perhaps something to aim for later...
my 0.22€
thomas
XIDE and capitalization of words
Posted: Fri Apr 24, 2020 11:33 am
by robert
Thomas,
Can you be more specific ?
Are you thinking of something like the Preprocessor output (/ppo) ?
Robert