Posts: 6,419
Threads: 74
Joined: Mar 2002
Quote:na_th_an: I bow before your superior intellect.
You don't need to! I'm just a QB help hog.
Posts: 3,368
Threads: 195
Joined: Jan 2003
Quote:FOR inc = 1 TO 10
x = x + inc
NEXT inc
PRINT "The sum is"; x
Have:
x = [1 . . 10]
? You're not doing anything in the loop. :|
If you wanted to add inc 10 times, you could do:
x = x + inc * 10
:|
Quote:And also:
x = x + 1
Change to:
x += 1
And then have the editor make it x = x + 1 for readability..
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 4,307
Threads: 63
Joined: May 2003
Quote:Quote:I think classes, function overloading/overriding, multiple inheritance, pointers and linked lists would be really great.
I can live without inheritance and classes... evil object-oriented techniques.
May be you can. But not me! They make life so much simpler!
Posts: 1,272
Threads: 36
Joined: Feb 2003
Quote:Quote:FOR inc = 1 TO 10
x = x + inc
NEXT inc
PRINT "The sum is"; x
Have:
x = [1 . . 10]
? You're not doing anything in the loop. :|
If you wanted to add inc 10 times, you could do:
x = x + inc * 10
:|
Sure he is. That translates to this:
x = x + 1
x = x + 2
x = x + 3
...and so on to:
x = x + 10
That's not the same as x = x + inc * 10. You see, he is adding inc into x 10 times, BUT inc's value is changing - it goes from 1 to 10.
Posts: 3,368
Threads: 195
Joined: Jan 2003
Oh, you're right. I didn't notice.
It's still possible to get the answer through multiplication, though.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 3,343
Threads: 83
Joined: Mar 2003
And the other idea of mine is very familiar to PHP proggers... any other lingos use it?
Back to the first idea: Indigo showed it to me as an example of some language syntax where the lingo was dedicated to number crunching... It'd be so much easier to write that sort of statement. And it would be easier to write too, especially if you don't start with 1 eg [234 . . 3765]