PLA Forums
Other Stuff That Has Little To Do With PLA => Techinical Shit => Technical Support => Topic started by: BrianOlsen on May 01, 2007, 10:49:14 PM
-
I'm wanting to use comments to explain a particular line of code and my editor is not reflecting it correctly. Here's my comments
/+ a=b;
/+ c=d; +/
e=a+c; +/
any help would be appreciated.
-
I'm wanting to use comments to explain a particular line of code and my editor is not reflecting it correctly. Here's my comments
/+ a=b;
/+ c=d; +/
e=a+c; +/
any help would be appreciated.
Why is that a big deal? Besides, you're nesting your comments.
-
Because they are needed when I want to comment out a block of code which already contains comments.
-
Then why not simply do this?
/+ a=b;
c=d;
e=a+c; +/
Or this:
/+ a=b; +/
/+ c=d; +/
/+ e=a+c; +/
It'll sure save the hassle of what your editor is doing.
-
I understand that, but dealing with embedded devices - like I do all day - C is still the programming language of choice. And C knows only this /* */ comment style. // has been introduced with C++. Nevertheless most compilers nowadays support // inside a C file. And as far as I remember it's part of the newer C99 standard. But usually the old C90 standard is used.
But as you know by my /+ that I'm using D. And D contains all three comment-outs.
-
Okay,
Lets use your example with C/C++ comment styles. According to your beginning post you basically wanted to do this: /* /* */ */. To me, this is pointless. The /* */ comment is designed for debugging. Normal comments should be made with the //.
If you comment out a block with the /* */ and want to comment out a bigger block, don't add more of them, just move the ones you have. If the language doesn't have 2 kinds of comments, they typically only have the single line comment like REM. If you write formatted easy to follow code, you really shouldn't have any block /* */ comments in your finished code anyway, so you'd only need that if you write ugly programs in a straight line and actually want to comment them. Chances are if you purposely write ugly code, you don't want any comments. If you write a nested block comment, the program should reach out and smack you.
-
I see what you're saying. Agree to disagree maybe? I'm going to test it while debugging. Also, I don't have a C compiler handy so I'll try tomorrow.
-
Sorry for not getting back to you. I ended up using the nested comments and just dealt with the fact that my editor did not highlight appropriately.
---------------------------------------------------------------------------
To change the subject what languages due you use to develop web apps?
-
I use XUL, JavaScript, HTML, and CSS.
-
I'm wanting to use comments to explain a particular line of code and my editor is not reflecting it correctly. Here's my comments
/+ a=b;
/+ c=d; +/
e=a+c; +/
any help would be appreciated.
That would comment out
a=b;
/+ c=d;
and leave you with
e=a+c; +/ uncommented
Rev. Greed is right. Delete the nested start and end comment tags and you will accomplish what you wanted.
-
I'm wanting to use comments to explain a particular line of code and my editor is not reflecting it correctly. Here's my comments
/+ a=b;
/+ c=d; +/
e=a+c; +/
any help would be appreciated.
That would comment out
a=b;
/+ c=d;
and leave you with
e=a+c; +/ uncommented
Rev. Greed is right. Delete the nested start and end comment tags and you will accomplish what you wanted.
Yeah, he was right. I fixed it.
-
Rev, you helped me out with SSI before...
I have a dynamic javascript controlled iframe that handles resizing of the iframe. I need to work that into the SSI.php file so that it calls the javascript function & loads whatever link fro SSI into the iframe.
The syntax that I would normally use to open a static link would be: href="javascript:loadintoIframe('mainframe', 'yabbse/index.php')"
I tried href="javascript:loadintoIframe('mainframe', ', $post['href'], ')" with various quote & comma options with no luck..
-
Try this:
Change:
href="javascript:loadintoIframe('mainframe', ', $post['href'], ')"
To this:
<a href="javascript:loadintoIframe(\'mainframe\', \'', $post['href'], '\')">
-
Damn, man. That was it. Did you go to school to learn this or what? How about I just send you all my stuff for you to finish.
-
Actually, I obtained a Bachelor's in Business Administration with a Marketing option. I minored in Computer Science though.
I self taught myself the vast majority of computer related activities. The game, Oregon Trail, back in the early 80's was what got me fascinated with computers. I was able to obtain the source code of that game and studied it like no other.
All in all, I wasn't about to spend thousands of dollars to major in Computer Science when I already knew the entire curriculum.
-
That's cool. I'm in college right now taking some computer courses. I need your help again but I will start a new thread.