Problem with Unit var

Help
2004-12-26
2013-04-24
  • Hi all,

    I have noted that when I describe a Unit var such as
    var
    {* Contatore globale delle istanze delle popup}
      Counter: integer;
    {* Variabile di prova}
      Prova: string;

    Pas2Dox generate a link to __pad0__ . Is there a way to delete this ?

    Thanks
    Antonio

     
    • I understood that __padx__ is generated for each var in initialization section. Is there a way to avoid this ?

      Thanks.
      Antonio

       
    • Darren Bowles
      Darren Bowles
      2005-01-13

      Can you provide me with a full example that I can document.

      I've just tried the following code :

      unit a;

      type
        a = class(b);
      end;

      var

      {* a comment}
      Counter: integer;
      {* another comment}
      Prova: string;

      implementation

      {$ifdef DOXYGEN_SKIP}
      something
      {$endif}

      end.

      With Doxygen 1.4.0 and everything appeared ok to me.

       
    • Hi Darren, thanks for your reply and your great software.
      Try the following code. Now I tried with Doxygen 1.4.1. and I got the same pad__xx__ result.

      Thanks.
      Antonio

      unit Unit1;

      interface

      uses
        Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
        Dialogs;

      type
      {*
        Classe MainForm per il progetto.}
        TForm1 = class(TForm)
        private
          { Private declarations }
        public
          { Public declarations }
        end;

      {* Variabile globale per la main form}
      var
        Form1: TForm1;
      {* Counter for form}
        Counter: integer;

      implementation

      {$R *.dfm}

      initialization

        Counter := 1;
      end.

       
    • Darren Bowles
      Darren Bowles
      2005-02-11

      Looks like a Bug where Counter := 1; is being converted to =1;

      Here's a workaround

      #ifndef DOXYGEN_SKIP
      Counter := 1;
      #endif

      Then add the following into your Doxyfile

      PREDEFINED             = DOXYGEN_SKIP

      This will tell Doxygen to ignore the code.

      Although not the nicest solution, I hope this helps.

      Ta,
      Darren.