![]() Topic awaiting preservation: Boolean problem (maybe) (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: NZ |
![]() Hi, guys. quote:
code: <html>
|
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() When comparing values, you must use a double-equals sign! |
Paranoid (IV) Inmate From: NZ |
![]() Hi, Slime. Good morning. code: <script type="text/javascript">
|
Bipolar (III) Inmate From: Cold Sweden |
![]() |
Maniac (V) Inmate From: Brisbane, Australia |
![]() Remember, ia Integer is a whole number, any non-whole number (that being any number with a percision greater that a whole number, something with decimal places) is a floating point number also know as a float. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() Actually, I've been telling him the opposite, because the truth is, it doesn't *always* work that way. If you add two form values together, it will not add the numbers, but it will concatenate the strings. That's the primary time when it will mess up. Aside from that, using the ParseFloat or ParseInt functions are still a good idea, so that you know that if the user doesn't input a number, the code will cause an error rather than silently continuing and not letting you know that something went wrong. It's also important for beginning programmers to understand the distinction between strings which look like numbers ("32") and numbers themselves (32). |
Maniac (V) Inmate From: Brisbane, Australia |
![]() quote:
|
Paranoid (IV) Inmate From: NZ |
![]() Hi, guys. Many many thanks for your replies. |