Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Add the "exported" statement directly to the function declarations?

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

  • Add the "exported" statement directly to the function declarations?

    Sometimes I get aware of some kinks in PB which irritate me when I loose overview or when I have to add some code to a program I have not edited for a long time.
    The purpose of function declarations is also to give the programmer an overview about what functions are defined in a project.
    When many functions are defined the length of code exceeds 2000 lines or so, then I declared for instance standard functions and exported ones.

    I'd be interested in having a look at the declarations and see which functions are exported. Shure, this can be done with a comment; but as You know, comments are sometimes not changed as they should be when an exported status was changed to standard or vice versa.
    But if You could see from the declaration which function is exported this would really make sense.
    Currently, it is only possible to have a look at a function declaration and then search in the code for the function to become informed if it is exported or not. The alias in the declaration does not help much as soon as the "export" statement is not attached to the function itself.

    So, why can't we add the "exported" statement directly to the function declarations?
    Norbert Doerre

  • #2
    I submitted a NFS to add a column to "CodeFinder" (F2) of IDE for "Exported Y/N" (this was a while ago).

    Maybe that would be sufficient for your purposes? If so, send in your own NFS and then PB will have at least two requests.

    But if you want to direct EXPORTing from a DECLARE line, send in a NFS for that.

    As to why it should NOT go on the DECLARE line...

    A DECLARE statement is essentially a statement about IMPORTING functions - "where can I find this procedure?" If no LIB is specified in the statement it tells the compiler to 'import' ( look for ) that procedure in the current code module.

    MCM
    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Michael,

      Please, what is a NFS?

      The EXPORT statement mostly concerns programmers writing DLLs, which import and export lots of functions. Only in these cases You loose overview when EXPORT can only be added to the function and not to it's declaration.

      I always have to write at least one list for imported and one for exported functon declarations separately in the header of the file. As soon as there exist 200 function declarations or, like in my case, up to 1000, and if lots of include files with further more function declarations are added, I simply regret not beeing able to see from the declaration if a function is exported, imported, or just used for the current file. I only propose to make this handling more evident in the future programming syntax of PB. Currently, I'm building three declaration groups separated by comment lines for this purpose.
      Norbert Doerre

      Comment


      • #4
        NFS=New Feature Suggestion

        Should be sent to [email protected]

        ------------------------------------------------------------

        If you want an overview of imports and exports for a given module you can print (or copy to Windows' clipboard)... check out:
        Show exports and imports for PB/Win 6x, 7x (original by Torsten Reinow)

        I added a 'print' (or maybe it was 'copy') to the original code.
        Michael Mattias
        Tal Systems Inc. (retired)
        Racine WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Michael,

          many thanks for Your support, and I'll test Your code hint.
          Norbert Doerre

          Comment

          Working...
          X