Description of solution:

You have strings with format  Vm.n.o  where m,n, and o are alphameric expressions of a number.

Convert these strings to format Vx.y.z where x, y, and z are numeric expressions  numbers (one byte length will be plenty if binary, two if BCD))

In other words, you need a function that returns the numeric value of a number expressed a a string of alphameric digits. Didn't have to be binary,  binary coded decimal also would work.

Whenever you can, break a problem into small easily tested steps. Here, the "guts" is to come up with a function that applied to a string which is the alphameric representation of a number returns a string that is a NUMERIC representation of that number.

'nix users  -- It's been too many years since I've looked at "the library of standard utilities" so for all I know, the function is already there. But in the spirit of the original Ritchie book (where exercises were writing your own version of utilities), if not, write such a function as an exercise.

Michael

PS: Hint needed? Again just logic/pseudocode     ---- Set num to 0; Do until end of string; nun = 10*num + num value of first char, string = rest of string


_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to