Post Reply 
Let's vote for suggestions and bugs
09-19-2018, 05:28 PM (This post was last modified: 09-19-2018 05:30 PM by grsbanks.)
Post: #50
RE: Let's vote for suggestions and bugs
I'd really like to see post/pre-incrementation and decrementation in HP-PPL (as in many other languages). It makes for more concise code and I bet it would run faster too.

So, instead of something like this:

Code:
variable := variable + 1;

  -- or --

variable := variable - 1;

You'd have:

Code:
variable++;

  -- or --

variable--;

This makes a lot of sense in loops as well. For example:

Code:
EXPORT whatever()
BEGIN
  LOCAL n := 10;
  WHILE n > 1 DO
    n := n - 1;
    DoSomethingWith(n);
  END;
END;

would become:

Code:
EXPORT whatever()
BEGIN
  LOCAL n := 10;
  WHILE --n DO DoSomethingWith(n); END;
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Let's vote for suggestions and bugs - grsbanks - 09-19-2018 05:28 PM
BREAK still reboot the calc - Oulan - 07-21-2019, 09:12 AM



User(s) browsing this thread: 1 Guest(s)