Post Reply 
newRPL - build 1255 released! [updated to 1299]
03-27-2018, 03:00 PM
Post: #177
RE: newRPL - build 1001 released! [update:build 1052]
(03-27-2018 12:55 PM)pier4r Wrote:  Nice! Surely some commands would benefit from further explanation but I am sure it will come slowly.
I only added a "short" explanation on the command list, so you can have an idea of what the command does before clicking, and also you can search in case you don't know exactly the name of the command. For example, on most browsers you can use Ctrl-F to find for instance "poly" and will take you right to the "Arithmetics and polynomials" category, and once you open it, you can keep searching to quickly jump through all the commands related to polynomials. This has always been a frustration for me when using the AUR (even the bookmarked one) because I can't recall the name of the command I'm looking for, and searching for terms in the entire book turns up too many results, takes a while to find what you are looking for.

(03-27-2018 12:55 PM)pier4r Wrote:  Where do I find the commands in the code? I tried to brows it, but aside some library files, like library arithmetic, I missed the others somehow. In other words I did not find (quickly) where the command are defined.

From there I can slowly work out the arguments, when the command is not that similar to userRPL.

The commands are in the 'lib-*.c' files (libraries) and the in-calc help is in the 'lib*.nrpl' files (which can give you additional clues).
They are defined in 2 places within the same library file:
* At the beginning there's a list of macros CMD(...) and ECMD(...) on each library. CMD(...) is used when the command name has "normal" characters and can be used as-is in C, and ECMD(...) for the opposite case. With ECMD(...) you define first a C-friendly name for the command and then the actual calculator command as UTF-8 text. For example, STO is defined using CMD(STO,...) but STO+ is defined as ECMD(STOADD,"STO+",...) because + cannot be used in C.
* Then the actual implementation is inside a switch() statement later on the same file. Once you see for example that STO+ is defined as STOADD, search the file for 'case STOADD:', or in most cases simply 'STOADD:' will suffice to find the actual code of the command.

If you have any questions on particular commands, feel free to email me privately so we don't pollute the forums or the wiki discussion.

What's the next step? On one side I'd say it's wise to first define the bulk of commands that are the same as the 50g. Those are the vast majority and you don't need to look at the code so it's fast to document them (please don't copy the AUR since it's copyright protected, come up with your own original explanations and examples). On the other side, current users can look up those in the AUR in the meanwhile, and really need the new commands explained, or the ones that have changed. So it seems wise as well to start doing the exact opposite. I don't know what's best.
I'd say start with whatever picks your interest, but please stick to the given template so there's consistency.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: newRPL - build 1001 released! - pier4r - 12-16-2017, 08:03 AM
newRPL - on Hp 39gs - Martin Hepperle - 06-05-2019, 06:51 AM
RE: newRPL - build 1001 released! - pier4r - 12-23-2017, 10:16 AM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 09:42 AM
t - Claudio L. - 01-01-2018, 03:06 PM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 03:41 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 04:54 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 06:58 PM
RE: newRPL - build 1001 released! [update:build 1052] - Claudio L. - 03-27-2018 03:00 PM
newRPL - brickviking - 10-05-2018, 06:01 AM
How to participate? - erazor - 12-13-2019, 07:12 AM

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