Post Reply 
(42S, Free42) Unit Conversion Suite
09-05-2020, 01:05 PM
Post: #18
RE: (42S, Free42) Unit Conversion Suite
(02-05-2018 02:00 PM)Werner Wrote:  (edited twice already to fix bugs in the printout ;-)
I'm almost done rewriting this completely, just to see if it could be done.
I define each unit category as a matrix.
...
Then I have a single column matrix with all categories that I call CCAT, so
..
Then all we need is a routine that will build a menu (with paging if necessary) out of the first column of a matrix, and treats the item chosen.
And so I end up with a single program that can treat as many conversions as you like - just define new matrices as you go along and add categories.
The routine is not 100% finished, but it already works as it is, so yes, it can be done ;-).

Cheers, Werner

Hello, Werner. I am new to this forum as well as to the 42 ecosystem (I've had a DM42 for just over a month, after decades without a programmable calculator).

I have been looking for a unit-conversion program that is user-modifiable and extensible, and your method make sense even to me... that is, I understand the format of the matrices even though I don't at all understand the code that follows.

Did you complete this project? It is an elegant and clear solution to a problem encountered by many.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (42S, Free42) Unit Conversion Suite - WLVA - 09-05-2020 01:05 PM



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