plusplus

Discussion in 'Basic4ppc Wishlist' started by enonod, May 26, 2008.

  1. enonod

    enonod Well-Known Member Licensed 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
     
  2. specci48

    specci48 Well-Known Member Licensed User

    I thought we are programming in basic(4ppc) and not in c, java or something else... ;)

    The modulus operator can be found in the section operators... :)

    specci48
     
  3. enonod

    enonod Well-Known Member Licensed 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: May 27, 2008
  4. klaus

    klaus Expert Licensed User

  5. specci48

    specci48 Well-Known Member Licensed User

    A little bit :sign0006: but
    Substring in Sinclair basic was coded like

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

    specci48
     
  6. specci48

    specci48 Well-Known Member Licensed User

    :sign0095:
     
  7. enonod

    enonod Well-Known Member Licensed 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.
     
  8. enonod

    enonod Well-Known Member Licensed User

    You are not alone badkarma.
     
  9. specci48

    specci48 Well-Known Member Licensed User

    :sign0156:
     
  10. mjcoon

    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.:)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice