Posts: 3,343
Threads: 83
Joined: Mar 2003
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
Posts: 1,080
Threads: 87
Joined: Feb 2002
Like remline.bas for c/c++?
/post]
Posts: 3,343
Threads: 83
Joined: Mar 2003
Sorta. That removes line numbers, I want a program to remove comments.
Posts: 3,279
Threads: 170
Joined: Nov 2003
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.
I'd knock on wood, but my desk is particle board.
Posts: 3,616
Threads: 287
Joined: Jan 2003
And I'll try.
Should I post it here, or PM it?
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 3,343
Threads: 83
Joined: Mar 2003
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
Posts: 1,752
Threads: 21
Joined: Jun 2002
# is also a comment in PHP and it's less typing than //
Posts: 3,343
Threads: 83
Joined: Mar 2003
Is it really? Well, there's my new thing for today
... I haven't seen it mentioned before, is it completely legal, etc?
Posts: 1,752
Threads: 21
Joined: Jun 2002
Posts: 3,279
Threads: 170
Joined: Nov 2003
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.
I'd knock on wood, but my desk is particle board.