C String Compare of 2 different length fields.

FrankCLT

Well Known Member
Hello,

I am needing to compare the returned value from the GetUDC (Description001) that contains a single value in the first position to a "Y". Everything I've tried fails with errors related to CHAR issues.

Thank you in advanced,
Frank
 
Errors in the C?

Maybe you can use the other already written BSFNs to do this?
 
Last edited:
It would help to see your code, but it should look something like this:

Code:
/*assuming dsUDC is the data structure used in the X0005 call*/

if (dsUDC.szDescription001[0] == _J('Y'))
{
    /* First CHAR in szDescription001 is Y.  In C "strings" are arrays of characters */
}
 
Back
Top