At 18:43 09/06/2004 -0700, Mark Wieder wrote:
Alex-
Wednesday, June 9, 2004, 4:11:53 PM, you wrote: Yup. I think many of us have been here before in starting out. Put quotes around any of the runrev objects and you'll stay out of trouble here.
put "something" into field "field1" --no problem put "something" into "field1" --error
That's a good tip (from a few people).
I always have explicitVariables turned on. I've read the warnings and I continue to ignore them. Even if I didn't have it turned on, I would always explicitly declare my variables. But I do think that whatever possible problems explicitVariables may cause are far outweighed by having the compiler catch some errors before they cause any real trouble.
Cool! I'll turn it on and just keep an eye out for problems.
AT> I don't think I've ever encountered a language where a valid expression AT> could cause unwanted side-effects in an expression using only a single AT> instance of an operator. Sigh.
...I may be wrong, but I don't think I've ever encountered a language where this wasn't the case.
Ummmmm - Algol ? FORTRAN ? Pascal ? C ? Python ? etc. I can't remember enough about Cobol and RPG, so I'll leave them out. (Is my age showing ? :-)
Take, for example, in C the difference between = and ==. How many times have you typed
if (c = 3) instead of if (c == 3) ?
Often. But that's not a counter-example; that's an example of using the wrong operator and the language design not helping to spot it; not an example of using the correct operator, which is the problem here. As I said - it caught me out mostly because string operations are so unusual.
I've gotten into the C habit of writing
if (3 == c) just to avoid those kinds of things.
I did that for a year or so - then the difficulty of reading it got too much, so I stopped. After another year, I got so tired of making the mistake, I started it again. Then it got annoying, so I stopped, ..... eventually I just gave up writing C completely and moved into the modern world of scripting languages :-)
-- Alex.
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.699 / Virus Database: 456 - Release Date: 04/06/2004
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
