Sponsored Content
Full Discussion: Documenting code
Top Forums Programming Documenting code Post 302526843 by Corona688 on Wednesday 1st of June 2011 02:50:03 PM
Old 06-01-2011
Quote:
Originally Posted by kristinu
I am programming using C++ and am wondering how to comment my project.

For example, when I declare a class I created a header with some description, then have the declaration stage, which I don't comment. Then when I define the actual functions I will put details about it, what it does, description of arguments etc.

Would be good to have people's opinion on this.
You should put the description in the header because that's where everyone's going to look. It means they don't need to hunt through hundreds of lines of source to find the function implementation they're interested in.

Besides -- if you ever distribute this code in library form, your users won't even have the source files, just the header and some objects.
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Documenting a Shell Script

I've been working on a very long shell script that's becoming a mini-application. It is my first script, and continues to grow each week, becoming more and more complex. I've been asked to document my script, beginning with basic information and then detailing any information about its... (1 Reply)
Discussion started by: yongho
1 Replies

2. UNIX for Dummies Questions & Answers

Any easy way of documenting cron entries?

I've been asked to do a high level summary of the cron jobs which run against a number of systems (to understand the potential scope for rewriting some of our core systems)...and was wondering how people have done this in the past. I've got approx 400 cron entries to go through. I will have... (2 Replies)
Discussion started by: GavP
2 Replies

3. Shell Programming and Scripting

Script Help -- documenting specific users that log into server

Hello All, I am trying trying to write a shell script that will do a couple things: 1.) Identify any username that logs into the server. 2.) When the user logs out, send them an email detailing their log in/out times, duration logged in, and what processes they ran. Basically,... (3 Replies)
Discussion started by: SecureScript
3 Replies

4. Shell Programming and Scripting

Documenting files with sed

All, I am looking for a way to improve this small one liner. one of the files has this kind of format public func <<<T>(array: , offset: Int) -> { return array.shiftedLeft(by: offset) } gsed -i '/public func/i /\/\/\public func \n/\/\==mark==public func' tresults in ///public func ... (5 Replies)
Discussion started by: f77hack
5 Replies

5. Web Development

Documenting Installation Problem with vue-beautiful-chat

REF: https://github.com/mattmezza/vue-beautiful-chat $ git clone https://github.com/mattmezza/vue-beautiful-chat.git Cloning into 'vue-beautiful-chat'... remote: Enumerating objects: 534, done. remote: Total 534 (delta 0), reused 0 (delta 0), pack-reused 534 Receiving objects: 100%... (2 Replies)
Discussion started by: Neo
2 Replies
CHARMAP(5)						     Linux Programmer's Manual							CHARMAP(5)

NAME
charmap - character set description file DESCRIPTION
A character set description (charmap) defines all available characters and their encodings in a character set. localedef(1) can use charmaps to create locale variants for different character sets. Syntax The charmap file starts with a header that may consist of the following keywords: <code_set_name> is followed by the name of the character map. <comment_char> is followed by a character that will be used as the comment character for the rest of the file. It defaults to the number sign (#). <escape_char> is followed by a character that should be used as the escape character for the rest of the file to mark characters that should be interpreted in a special way. It defaults to the backslash (). <mb_cur_max> is followed by the maximum number of bytes for a character. The default value is 1. <mb_cur_min> is followed by the minimum number of bytes for a character. This value must be less than or equal than <mb_cur_max>. If not speci- fied, it defaults to <mb_cur_max>. The character set definition section starts with the keyword CHARMAP in the first column. The following lines may have one of the two following forms to define the character set: <character> byte-sequence comment This form defines exactly one character and its byte sequence, comment being optional. <character>..<character> byte-sequence comment This form defines a character range and its byte sequence, comment being optional. The character set definition section ends with the string END CHARMAP. The character set definition section may optionally be followed by a section to define widths of characters. The WIDTH_DEFAULT keyword can be used to define the default width for all characters not explicitly listed. The default character width is 1. The width section for individual characters starts with the keyword WIDTH in the first column. The following lines may have one of the two following forms to define the widths of the characters: <character> width This form defines the width of exactly one character. <character>...<character> width This form defines the width for all the characters in the range. The width definition section ends with the string END WIDTH. FILES
/usr/share/i18n/charmaps Usual default character map path. CONFORMING TO
POSIX.2. EXAMPLE
The Euro sign is defined as follows in the UTF-8 charmap: <U20AC> /xe2/x82/xac EURO SIGN SEE ALSO
iconv(1), locale(1), localedef(1), locale(5), charsets(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU
2016-07-17 CHARMAP(5)
All times are GMT -4. The time now is 03:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy