Passing HHMMSS to a C BSFN and parsing that out.

FrankCLT

Well Known Member
Hello,

A value is being passed into the C BSFN in the form of HHMMSS... for example 105035. So mnHHMMSSStartTime would equal 105035. How would i be able to parse that into 3 fields like a Data Structure something like....

typedef Struct {
MATH_NUMERIC mnHHe; 10
MATH_NUMERIC mnMMe; 50
MATH_NUMERIC mnSSe; 35
} DS?????, *LP?????;


Any help would be greatly appreciated.....

Thank you,
FrankCLT







 
Pseudo-code for you:

mnHHe = int(inputvalue/10000)
temp = inputvalue-mnHHe*10000
mnMMe = int(temp/100)
mnSSe = temp-mnMMe*100
 
Thank you....haven't tried it yet....but it seems i have attempted this before but i just cant seem to find the BSFN we've done this with. Am i mistaken about moving the Math_Numeric to a DS with 3 fields within in order to parse?

Thanks again,
FrankCLT
 
If you want to create the DS to hold the three fields, that's fine, but you still are going to have to break it apart mathematically. The DS just by its own nature won't do that for you -- if that's what you're asking.
 
Understood....I will need to experiment with the MathDivide related variables...haven't done that very often.

Thank you,
FrankCLT
 
You may also want to check out the NER N1300600, which does much of what you're looking for.
 
I found B9800188 that i think will work as well. Thanks for all the assistance.

FrankCLT
 
Back
Top