View Single Post
Old 05-20-2009, 05:14 AM   #11 (permalink)
oldskool
oldskool's Avatar
 
Electrical Systems Design

Join Date: Jun 2008

Location: Maine, USA

Posts: 1,652

oldskool has a spectacular aura aboutoldskool has a spectacular aura about

Default Re: the tricky business of programming

^ If you are using a compiler. For Javascript you can use Notepad, and some people do. Javascript doesn't get compiled, like the other languages mentioned. The browser "renders" it, but Javascript doesn't get compiled. It is not a stand-alone application, just code used within HTML in the form of a script.

^^ Yes the moral of the thread is be careful, but don't let it end like that. I was just trying to think of some obvious mistakes.

Quote:
Things that aren't technical errors, but aren't what you want to do (like the = and == functions)
^ Yes that would be an error, if you try to say:

If (someVariable = someOtherVariable) {
// the code here wouldn't work if, if "someVariable were equal
//to 5 and someOtherVariable = 5 as well.
}

That is because the code is NOT COMPARING the two values. It is trying to make
someVariable receive the value of someOtherVariable, not compare the two.
What would be needed in this case would be the == .

So you are wrong, Soulphire. Sorry. Unless you can show me what you mean, with an example.

Last edited by oldskool; 05-20-2009 at 05:58 AM.
oldskool is offline   Reply With Quote