plusplus

enonod

Well-Known Member
Licensed User
Longtime User
It would be nice to use A++ instead of A=A+1, same for minus. I tried it but no luck.

By the way the help system 'seems' not to have either Div or Mod
 

specci48

Well-Known Member
Licensed User
Longtime User
It would be nice to use A++ instead of A=A+1, same for minus. I tried it but no luck.
I thought we are programming in basic(4ppc) and not in c, java or something else... ;)

By the way the help system 'seems' not to have either Div or Mod
The modulus operator can be found in the section operators... :)

specci48
 

enonod

Well-Known Member
Licensed User
Longtime User
Regarding ++, is that a reason not to make things a little easier (and give a choice to purists)? It reminds me of politicians not being allowed to change their minds like the rest of us.
:)

Thanks for that, I guess there are so many to look through I got tired eyes.
:signOops:

[EDIT] Ah! not the whole truth... where is DIV?
 
Last edited:

klaus

Expert
Licensed User
Longtime User

specci48

Well-Known Member
Licensed User
Longtime User
A little bit :sign0006: but
Does anyone know which BASIC's contained strindexof and substring? - are these from TRS80s and Sinclair kit etc?
Substring in Sinclair basic was coded like

B4X:
a$ = "basic4ppc"
Print a$(4 to 7)
Result: "ic4p"

specci48
 

enonod

Well-Known Member
Licensed User
Longtime User
Well, sorry for starting that. Having read all points of view, I agree, now.
badkarma 'nutshelled' it.
I also agree with the string manipulation from Commodore, which I also used; as well as one of the best, BBCBasic, which is still in use ported and updated to PC, it also had the string bits left etc. Another good one was Sinclair QL a bit more sophisticated.
I don't want to start anything.
 

enonod

Well-Known Member
Licensed User
Longtime User
You are not alone badkarma.
 

mjcoon

Well-Known Member
Licensed User
Inc(a) and Dec(a) could be macros (sophisticated string substitutions with parameters) that just expand to a=a+1 and so forth...

I think that the original justifications for some of the modify-in-place operators invented in the past (e.g. bit-wise masking and so forth) is that it saves an optimising compiler from having to work out that the answer goes back to the operand location; the hint is in the source.

But the same hint can be useful to the human (well, programmer at any rate:)) reader.

Mike.:)
 
Top