Wiki

Clone wiki

PureWork / Code documentation

Why C comment syntax in PureBasic comment lines?

It is less a personal style than pure pragmatism. Because, I use a document generator tool that was written for C. So I just have to configure it a little bit. Also, PureBasic hasn't a block comment syntax. But the document generator tool need it to work properly.

For example how to comment code in PureWork, look into the code of PureWork.module.pbi.

Specifications

  • All functions should be documented.
  • All variables should be documented.
  • All types should be documented.
  • All these should be documented in extended Doxygen style (with types in param and var tags).
  • All module folders should contains an API.pb.txt file. This should contain examples of hooks provided by the module which is in the folder.
  • Every file should have a file header.

File header

#!purebasic

; /**
;  * [DESCRIPTION OF THE MODULE OR THE SOURCE CODE FILE.]
;  *
;  * @author [AUTHOR NAME (ALTERNATIVE @authors WITH MORE THAN ONE NAME)]
;  * 
;  * This file is part of PureWork.
;  * 
;  * PureWork is free software: you can redistribute it And/Or modify
;  * it under the terms of the GNU General Public License As published by
;  * the Free Software Foundation, either version 3 of the License, Or
;  * (at your option) any later version.
;  * 
;  * PureWork is distributed in the hope that it will be useful,
;  * but WITHOUT ANY WARRANTY; without even the implied warranty of
;  * MERCHANTABILITY Or FITNESS For A PARTICULAR PURPOSE.  See the
;  * GNU General Public License For more details.
;  * 
;  * You should have received a copy of the GNU General Public License
;  * along With PureWork.  If Not, see <http://www.gnu.org/licenses/>.
;  */

Updated