spend a lot of time and feeling like I run into a dead cycle with a
problem, that looks trivial.
I have packed decimals in my C programs that I need to convert to a
char array, representing the number (not zero terminated string).
decimal (15,9) A ;
char szTemp, sField ;
sprintf(szTemp, "%016D(15,9)", A) ;
memcpy(sField, szTemp, 16) ;
What I want to achieve is get a function, that receives A and returns sField.
Of course it must support any types of decimal - not only decimal
(15,9) but others like decimal(11,7), decimal (15,0), decimal (5,0)
and so on. And, of course, decimal can be positive or negative...
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives