Page 1 of 2
Modula in Version 3.8
Posted: Wed Sep 24, 2003 5:07 pm
by GPI
I heard, that in the next version a modula is included by the char %. I think, that this would be not the best char, because this is already used for dual-digits (%1010110).
Ok, the code should be always one possible of interpretation, but i think, that beginners could be confused. Also jaPBe will be confused...
GPI
Posted: Wed Sep 24, 2003 6:30 pm
by freedimension
Sorry for that, but the % char ist the perfect char for it.
That's because it's the standard char for Modulo in every other language that supports the modulo operator I know of.
Taking another char would confuse everybody with a little more programming knowledge and wouldn't help the beginners a lot too because they learn the wrong char and as soon as they try out another language they have to adopt to the %
Posted: Wed Sep 24, 2003 7:25 pm
by Jedive
'Mod', like in Blitz, would be cool too, so we avoid confusion:
a=10 Mod 3
Would be the same as:
a=10 % 3
Posted: Wed Sep 24, 2003 7:37 pm
by freak
> 'Mod', like in Blitz, would be cool too
In PB, all math and binary operators are represented by a single character.
Logical operators are represented as a word.
So it doesn't make sense to name it 'Mod' as it is no logical operator.
Saying it will confuse beginners is not the best excuse for being too lazy
for changing jaPEe
Timo
Posted: Wed Sep 24, 2003 8:31 pm
by GPI
freak wrote:> 'Mod', like in Blitz, would be cool too
In PB, all math and binary operators are represented by a single character.
Logical operators are represented as a word.
I also know other languages (for example Omikron basic) and there are also *+/- but also MOD for modulo.
Saying it will confuse beginners is not the best excuse for being too lazy
for changing jaPEe
Two complete diffrent things.
Ok,it is not so easy to find out, what % then means (for jaPBe), because he has not a good "line check", because it is doesn't needed for now.
Also it is easier to read a source, when % don't have two meanings.
Of course, it is stupid to use a other char, but double meaning of % isn't a good idea. It is like the Constant is not Constant thing...
Posted: Wed Sep 24, 2003 8:49 pm
by dmoc
> In PB, all math and binary operators are represented by a single character.
One exception being Pow() which is usually denoted by ** or ^
But I agree % is more standard. I could (and do) live with Mod()
Posted: Wed Sep 24, 2003 8:53 pm
by freak
> One exception being Pow() which is usually denoted by ** or ^
Yeah, i miss than one, too. Especially since Pow() is for floats, and it would
be cool to have an integer one.
Timo
Posted: Wed Sep 24, 2003 9:08 pm
by GedB
We manage OK with the dual use of -.
% is exactly the same, since there is a distinct unary and binary meaning.
Posted: Wed Sep 24, 2003 11:28 pm
by freedimension
And the dual use of the * not to forget
Posted: Thu Sep 25, 2003 9:53 am
by Fred
GPI: What is exactly the problem with JaPBe ? The introduction of this operand shouldn't break any code as the binary numbers will be still correctly interpreted:
Code: Select all
a = 10 + %10101 ; Still working properly
a = 10 % %11 ; Works ok too.
As FreeDimension said, the pointer thing is the same (a = a* *b)
Posted: Thu Sep 25, 2003 3:19 pm
by Inner
GPI: Just use UltraEdit

Posted: Thu Sep 25, 2003 3:53 pm
by LarsG
Just wondering.. what if we omit the spaces?!?
say if we did something like this: a = 10%10 ?
-Lars
Posted: Thu Sep 25, 2003 4:02 pm
by freak
a = 10%10
Is interpreted as 10 mod 10, because if the % would mean binary here,
then there would be another operator missing between 10 and %10.
Timo
Posted: Thu Sep 25, 2003 5:48 pm
by GPI
freak wrote:a = 10%10
Is interpreted as 10 mod 10, because if the % would mean binary here,
then there would be another operator missing between 10 and %10.
Timo
Yes, i know it, but for japbe, %10 is here a binary. That is the big diffrent to *name and mul. I don't think, that somehing like *adr2= 2**Adr1 is ever written, because it makes no thense.
A=b%%10 looks little bit stupid.
also japbe looks word for word and all chars are seperators.
Posted: Thu Sep 25, 2003 7:44 pm
by freak
jaPBe is your problem ...
An Editor should be designed to work with the compiler, not the other way around.
Timo