1
0
-1

Hi,

Extracted from pdf  "Uniface 7.2 Uniface Coding standards":

"Use either two or three spaces consistently for indenting Proc code in
nested structures—do not use tabs!"


How to indent Uniface-code? Using Uniface 9.7 and the button "Format Proc in current trigger", it uses tabs. Can I change that to use spaces?

Regards RogerW.

    CommentAdd your comment...

    3 answers

    1.  
      1
      0
      -1

      Is U10 this not done by the IDE itself?, so you don't need to put spaces or tabs yourself.
      If not, this should be added on the wishlist/roadmap


        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi,

        Yes, 7.2 standards are old, but still there is a point in this.

        So my point is, using "Format Proc in current trigger", you have no other choice than using tabs. So what as the coding standards has been  "Use spaces", ie. you have a lot of code containing spaces.

        I think the default in eg. Visual Studio is that using a tab to indent, it will put some spaces instead. But you can use the settings to change this in several different ways.

        This is perhaps just a little thing, but still very annoying. It could easily be corrected by Uniface, allowing to use spaces in "Format Proc in current trigger".

        So, there should be a setting: 1. Keep tabs Or 2. Replace Tab with X spaces.
        Choosing "Replace tab" you should also set the number of spaces. This should then be the behaviour as you hit the tab or execute "Format Proc in current trigger".

        Regards RogerW.


        1. Ingo Stiller

          Hi Roger

          You are right, this "format proc trigger" in UnifAce is very old fashioned as it only indent by tabs.
          As a hardcore "fan"*) of UnifAce since 1993 i did wrote my one formating tool.
          Okay, it's still a simple indent by blanks but also formats some keywords.
          This tool is written in UnifAce itself and does implement an interpreter of the UnifAce proc language.
          From the output of the interpreter I can then indent each statement as I want and "correct" some statements. 
          If I had more time, I will extend the tools, but still we are fighting against market as the wan't moderen surface with grids, dynamic field and more usefull widgets
          C++ is knocking at our doors and may be we loosing the fight

          As in this  Blog by Jorge Nuñez-Orellana told us, the lab is looking for "crazy" ideas, so why not a few tool to format and refactoring the code line?
          Dear UnifAce, just think about a few enhancments to the proc editor but not some crazy ideas like "mobil support in dessert" (so told by a presenter to the U.B.G in german)
          And please implement this enhancments in UF 9.7 as UF 10 is still in beta

          Ingo

          *) With the new raodmaps of UnifAce,  it seems that UnifAce is not longer UnifAce (sad)

        CommentAdd your comment...
      2.  
        1
        0
        -1

        Hi Roger,

        Uniface 7.2 standards are 20+ years old. Uniface environment is vastly improved during last two decades.

        I think you can use today either tabs or spaces...I am using tabs.

        Regards,
        Gianni

          CommentAdd your comment...