XIDE and capitalization of words

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

XIDE and capitalization of words

Post 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
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

XIDE and capitalization of words

Post 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.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

XIDE and capitalization of words

Post 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
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

XIDE and capitalization of words

Post by Chris »

Yeah, that's exactly what I thought of as well :)
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
mainhatten
Posts: 200
Joined: Wed Oct 09, 2019 6:51 pm

XIDE and capitalization of words

Post 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
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

XIDE and capitalization of words

Post by robert »

Thomas,

Can you be more specific ?
Are you thinking of something like the Preprocessor output (/ppo) ?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply