Page 2 of 3

Posted: Wed Jan 25, 2006 3:27 pm
by blueznl
i was not refering to the chained hasselhof but to the code that's brewing!

Posted: Wed Jan 25, 2006 3:47 pm
by Dare2
lol.

Posted: Thu Jan 26, 2006 12:58 pm
by chris319
I also want ^ instead of Pow and Mod instead of %

And this is totally illogical, when you think on it. First swap a symbol for a keyword - but then swap a keyword for a symbol. We are so patterned!
I hate to bring up something as silly as a standard, but the ANSI/ISO standard for the BASIC programming language specifies ^ for exponentiation and MOD for modulo, so your wishes are not totally capricious. I second your vote for ^ and MOD.

Posted: Thu Jan 26, 2006 1:29 pm
by blueznl
well purebasic is not the first basic dialect to use % for modulo, so that one is not an issue, but the ^ is indeed missing... and standards... it's pure, not standardbasic :-)

Posted: Thu Jan 26, 2006 3:54 pm
by Trond
It's much faster to compile with single-character tokens (like%).

Posted: Thu Jan 26, 2006 4:05 pm
by Fred
In PB you have a logic:

- non ascii characters for binary operands: +, !, *, <<, % ...
- full letter keyword for logical operands: And, Or, XOr, possibly Not as well ;).

It's not planned to be changed at all.

Posted: Thu Jan 26, 2006 6:07 pm
by akee
Yes! I support the NOT operator...

PB feels naked without it... :p

Posted: Thu Jan 26, 2006 9:04 pm
by chris319
In PB you have a logic:

- non ascii characters for binary operands: +, !, *, <<, % ...
- full letter keyword for logical operands: And, Or, XOr, possibly Not as well :wink:
Pow?

Posted: Thu Jan 26, 2006 9:35 pm
by Fred
Pow() is a command, like Abs(). It's not a purebasic operand.

Posted: Thu Jan 26, 2006 10:26 pm
by chris319
Fred wrote:Pow() is a command, like Abs(). It's not a purebasic operand.
So if PB had a function Add(), it would be considered a command and not an operand.

Posted: Thu Jan 26, 2006 10:42 pm
by Flype
i'm just dreaming: the IN statement

Code: Select all

If "test" In "this is a test" : Endif

Dim myArray.b(10)

For i=0 to 10
    myArray(i)=Random(255)
Next

If 129 In myArray() : Endif
and so on...

Posted: Thu Jan 26, 2006 11:17 pm
by Fred
chris319 wrote:So if PB had a function Add(), it would be considered a command and not an operand.
Exactly.

Posted: Fri Jan 27, 2006 12:07 am
by blueznl
is't that 'function' instead of command?

Posted: Fri Jan 27, 2006 9:50 am
by Trond
Flype wrote:i'm just dreaming: the IN statement

Code: Select all

If "test" In "this is a test" : Endif

Dim myArray.b(10)

For i=0 to 10
    myArray(i)=Random(255)
Next

If 129 In myArray() : Endif
and so on...
It will surely be used more than strictly neccessary, and that´s not good because it´s very slow.

Posted: Fri Jan 27, 2006 4:00 pm
by MikeB
I'm not quite sure what this is supposed to do
If "test" In "this is a test" : Endif

Dim myArray.b(10)

For i=0 to 10
myArray(i)=Random(255)
Next

If 129 In myArray() : Endif
Surely everything there will always take place as there is nothing happening between the If xxx and the EndIf in either case.