Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Feature Idea - Custom Formatted Comments
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

LarryLeonard
Tomato Guru

USA
1041 Posts

Posted - Dec 31 2003 :  08:33:12 AM  Show Profile
It just occurred to me that since VAX has (apparently) total control over how characters are rendered, maybe it could do something I've been wanting for years.

I'm an advocate of having all documentation for a class in the CPP or H files themselves; that is, no external documentation - it just gets lost or outdated. The only problem with this is that comments in C++ are, of course, plaintext: there's no notion of fonts or colors, for example.

What if VAX could give me a simple UI (sort of like the one one the web page I'm currently typing in) that would let me (in specially-marked boxes) do my comments like this:

/* {{VAX}}

Note: For God's sake never delete this pointer, or the frammitz object will corrupt the thurman unit!

*/

I have no idea of how you could implement something like this, but it seems possible: I mean, you're setting colors and italics everywhere as it is... just a thought.

Stephen
Tomato Guru

United Kingdom
781 Posts

Posted - Dec 31 2003 :  10:03:40 AM  Show Profile
I can't decide whether I think this is a good idea or not. It could be really useful -- but it assumes that the code will only ever be edited or viewed in a VA-enabled IDE. I don't even do that for my own code -- I sometimes view it in another editor or a shell, and presumably all the formatting will then show up. On the other hand, your example does look really good!

Stephen Turner
ClickTracks http://www.clicktracks.com/
Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
Go to Top of Page

LarryLeonard
Tomato Guru

USA
1041 Posts

Posted - Dec 31 2003 :  10:22:07 AM  Show Profile
Yeah, that's a problem... my example, which would look great in the IDE, might look like crap in Notepad. Well, maybe the LADS can put the comment in twice: once in plain text, and once formatted:


/* Note: For God's sake never delete this pointer, or the frammitz object will corrupt the thurman unit!

{{VAX}}{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fswiss\\fcharset0 Arial;}{\\f1\\fswiss\\fprq2\\fcharset0 System;}}{\\colortbl ;\\red0\\green0\\blue0;}{\\*\\generator Riched20 5.40.11.2210;}\\viewkind4\\uc1\\pard\\fi-1800\\li1800\\tx1800\\cf1\\b\\f0\\f\\parNote: {\\f1\\fswiss\\fprq2\\fcharset0 System;}}For God's sake never delete this pointer, or the {\\f1\\fswiss\\fprq2\\fcharset0 System;}}frammitz {\\f1\\fswiss\\fprq2\\fcharset0 System;}}object will {\\f1\\fswiss\\fprq2\\fcharset0 System;}}corrupt{\\f1\\fswiss\\fprq2\\fcharset0 System;}} the {\\f1\\fswiss\\fprq2\\fcharset0 System;}}thurman{\\f1\\fswiss\\fprq2\\fcharset0 System;}} unit! */


At any rate, this is something I wouldn't use on every comment, just the huge block at the top of the file that documents what the class as a whole does. Formatting that kind of documentation - as oppossed to in-line comments - would be really useful, I think.

Feels like XML/XSLT should somehow come to our rescue right about now, doesn't it?

Edited by - LarryLeonard on Dec 31 2003 10:23:37 AM
Go to Top of Page

Cezariusz
Tomato Guru

Poland
244 Posts

Posted - Jan 04 2004 :  07:05:19 AM  Show Profile
Considering current problems with bold and italic I don't think this kind of advanced formatting is possible.
But what I think is possible is to show such comment:

    // This it <u>very</u>important:
    // Call <b>Initialize</b> before using this function.
    // Note: <red>never</red> delete <blue><i>this</i></blue> pointer
as:

    // This it <u>very</u>important:
    // Call <b>Initialize</b> before using this function.
    // Note: <red>never</red> delete <blue><i>this</i></blue> pointer

Note that some doc generators also understand this kind of tags in comments.
Nevertheless I think there are still lots of more useful features to include.

Cezariusz Marek
https://midicat.net/
Go to Top of Page

LarryLeonard
Tomato Guru

USA
1041 Posts

Posted - Jan 05 2004 :  09:17:02 AM  Show Profile
Heck, that would be good enough for me... good idea, C.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000