C String Compare of 2 different length fields.

FrankCLT

Active 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
 

craig_welton

Legendary Poster
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 */
}
 
Top