C Style commenting - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QbasicNews.Com (http://qbasicnews.com/newforum/forum-3.html) +--- Forum: Challenges (http://qbasicnews.com/newforum/forum-10.html) +--- Thread: C Style commenting (/thread-2872.html) |
C Style commenting - oracle - 01-01-2004 Create a Q(uick)Basic program to scan an inputted file for "C" style comments (eg // for one-line comments and /* */ for multiline comments) and remove them. The program should be able to remove comments from any type of file that uses C style comments, including PHP and CSS files etc. Bonus points given for a program that can have inputted many different types of one-line and multiline comments and remove them all. There's no time limit yet, until I see how popular this is Go C Style commenting - red_Marvin - 01-01-2004 Like remline.bas for c/c++? C Style commenting - oracle - 01-01-2004 Sorta. That removes line numbers, I want a program to remove comments. C Style commenting - adosorken - 01-01-2004 I hate to play the devil's advocate :evil: but // is C++, not C ...and this is way too easy for anyone with a basic (no pun intended) understanding of string manipulation :lol: I'll make one when I have the time. C Style commenting - Zack - 01-01-2004 And I'll try. Should I post it here, or PM it? C Style commenting - oracle - 01-01-2004 Well then, ado, we'll see a winning entry from you then, won't we? :lol: And... whatever about the //. That's a comment in PHP, and it's a one line comment, so it's a good thing to add. Don't forget, for bonus points I want a proggie that I can input the remarks into and it will work anyway, so I'll be trying with ' and REM as well :lol: Please PM the answers to me, do not post them here, that sorta ruins it C Style commenting - Plasma - 01-01-2004 # is also a comment in PHP and it's less typing than // C Style commenting - oracle - 01-01-2004 Is it really? Well, there's my new thing for today ... I haven't seen it mentioned before, is it completely legal, etc? C Style commenting - Plasma - 01-01-2004 http://us3.php.net/manual/en/language.basic-syntax.comments.php C Style commenting - adosorken - 01-01-2004 Yeah, # is used pretty often in other stuff as well...coders who write custom INI file handlers and whatnot tend to use # as a comment line. I think, but I'm not 100% sure, that it's used in Perl as well...but like i said, I dunno for sure......... After I finish up this new website, I'll take out a couple days out of my vacation to write up a lil sumthin and send it to ya. |