Announcement

Collapse
No announcement yet.

4DGL Document Generator

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 4DGL Document Generator

    I was wondering if there is the possibility to use a document generator to get the documentation automatically directly from our own 4DGL code, just by putting some comments into the code. If nothing is available at the moment, I put it as a suggestion for the 4D System Development Team.

  • #2
    Hello Pasquale,

    Are you suggesting a function similar to the 'F1' shortcut key?

    If you haven't tried it yet, you could try clicking on a particular command on your 4DGL code and then pressing F1, this should lead you to a relevant section of our reference manuals.

    On the options section, you could also enable 'show hints'. This would enable Workshop4 to show you coding hints (e.g. proper syntax).

    Click image for larger version

Name:	settings.PNG
Views:	1
Size:	85.6 KB
ID:	66127

    I hope I understood your suggestion correctly.

    Best regards,
    Michael

    Comment


    • #3
      Originally posted by michael_4D View Post
      Hello Pasquale,

      Are you suggesting a function similar to the 'F1' shortcut key?

      If you haven't tried it yet, you could try clicking on a particular command on your 4DGL code and then pressing F1, this should lead you to a relevant section of our reference manuals.

      On the options section, you could also enable 'show hints'. This would enable Workshop4 to show you coding hints (e.g. proper syntax).

      Click image for larger version  Name:	settings.PNG Views:	1 Size:	85.6 KB ID:	66127

      I hope I understood your suggestion correctly.

      Best regards,
      No Michael, I was not speaking about this even if I did not know about this interesting function. To be more exhaustive, I refer to writing the documentation for my own code. I have my personal 4DGL libraries which require to be documented. I was wondering if there is the possibility to have a tool which helps me to create documentation for 4DGL code, something like Javadoc for Java. I have seen that in the file "Diablo16_Functions.fnc" there are some clues which suggest me that something similar is already used by 4DGL Development Team. For example, taking the function putch, in the file you can find this text:

      func putch("char"), 0; // write single char to current output device
      // Syntax : putch("char");
      // Usage : putch("A");
      // Notes : prints single characters to the current output stream, usually the
      // : display unless redirected with the ‘to’ redirection function.
      // : The arguments can be a variable, array element, expression or constant.

      It looks really that you can define some inline-comment in a way to explain what the code does and even to use a parser to produce automatically the documentation. Well, if this tool is already used I would like to know if it is public and how I can use it to produce documentation from the source code.
      I hope that I gave to you a better explanation of what I am requiring.

      Regards,
      Pasquale
      Last edited by pasquale.gaeta; 26th November 2018, 07:42 PM.

      Comment


      • #4
        Hello Pasquale,

        Thank you for the clarification and sorry if I misunderstood your suggestion.

        Our Development team has been notified of this.

        Best regards,
        Michael

        Comment


        • #5
          You can create your own help/hint file along the lines of the attached, hopefully the sample has enough information in it to get you going.

          Once you have created this file (the extension is no inportant), place it in the C:\Program Files (x86)\4D Labs\4D Workshop 4 IDE\INCLUDE folder.

          Then you will need to edit the 4DGL-PLATFORMS.SYS file in the same folder.

          Find the display you are using, eg [uLCD-43P] and then add the filename somewhere after that, but before the next blank line.
          Attached Files
          Mark

          Comment


          • #6
            Originally posted by ESPsupport View Post
            You can create your own help/hint file along the lines of the attached, hopefully the sample has enough information in it to get you going.

            Once you have created this file (the extension is no inportant), place it in the C:\Program Files (x86)\4D Labs\4D Workshop 4 IDE\INCLUDE folder.

            Then you will need to edit the 4DGL-PLATFORMS.SYS file in the same folder.

            Find the display you are using, eg [uLCD-43P] and then add the filename somewhere after that, but before the next blank line.
            Thanks for the reply. We are close to what I am asking but there is something that still needs to be clarified. With this solution, I can write an help file which can be used by the Workshop IDE. However, my request is not full filled. What I would like to know is if there is a tool/compiler which can take this "help file" and create a documentation (PDF, HTML, etc.) for the code. Speaking using your documentation, is it possible to generate the file "Diablo16_InternalFunctions_R_2_0.pdf" directly from the "help file" or something similar? Would be great if the document realization for a 4DGL code could speed up by defining a single file (better if this definition could be integrated directly into the source code to have better version control) which can be used for everything.
            Put more simply, I need to:
            1) use inside the source code description for libraries, constant and functions;
            2) create a documentation for my libraries in one of the standard document format (PDF, HTML, etc).

            The second point is a boring activity because might require to copy all descriptions which have been used for the first point. In addition, it requires to create layout and style for the document. What is even more boring is that each change in the source code the document must be updated manually, which makes the congruence between the source code and the related documentation much more complicated.

            What really I would like to avoid is defining the "pdf/html library document" manually, if there is already a tool which helps you to create the "PDF document" for your libraries.
            Last edited by pasquale.gaeta; 27th November 2018, 08:08 PM.

            Comment


            • #7
              No there is nothing from us that can do this.

              Many years ago we were, sort of, heading down this path, but we found the 'quality' of document that can be produced in this way was far less than that that could be produced by a document that could be created from scratch.

              Having said that, whilst not overly familiar with such products, I suspect some C/C++/C# documentation generators will work 'out of the box' with 4DGL, specifically the ones that use /// and/or 'directives' within comments.
              Mark

              Comment

              Working...
              X