fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: XIDE and capitalization of words

XIDE and capitalization of words 22 Apr 2020 09:37 #14136

  • Karl-Heinz's Avatar

  • Karl-Heinz

  • Topic Author


  • Posts: 575
  • 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

    Please Log in or Create an account to join the conversation.

    XIDE and capitalization of words 22 Apr 2020 10:00 #14137

  • Chris's Avatar

  • Chris


  • Posts: 1957
  • 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.
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    XIDE and capitalization of words 22 Apr 2020 17:55 #14138

  • Karl-Heinz's Avatar

  • Karl-Heinz

  • Topic Author


  • Posts: 575
  • Hi Chris,

    A solution might be to add a section e.g. [IGNORE] to the Keywords.cfg, so a entry might look like:
    ; Add words to be treated as keywords
    ; each keyword in separate lines, in Proper form (MyNewKeyword)
    
    ;Wait
    ;Use
    
    
    [IGNORE]
    DATE
    

    regards
    Karl-Heinz

    Please Log in or Create an account to join the conversation.

    XIDE and capitalization of words 22 Apr 2020 19:11 #14143

  • Chris's Avatar

  • Chris


  • Posts: 1957
  • Yeah, that's exactly what I thought of as well :)
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    XIDE and capitalization of words 24 Apr 2020 08:57 #14188

  • mainhatten's Avatar

  • mainhatten


  • Posts: 139
  • 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

    Please Log in or Create an account to join the conversation.

    XIDE and capitalization of words 24 Apr 2020 13:33 #14199

  • robert's Avatar

  • robert


  • Posts: 1746
  • Thomas,

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

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1