Struggling with API QDFRTVFD

Frank Kolmann <[email protected]>
Newsgroups gmane.comp.lang.as400.c
Message-ID <CAB-SQvgqvK5sSQYrEyF2GsKc3sPmvL8VsbH3=mh99yC4b-MYqQ@mail.gmail.com>
Hi Scott

Thanks.  You didnt't miss anything.
This worked
if (p_QDFFFINF->WDFFFIOA == 0x01) {
   // whatever
}

I just was copying the IBM code on string compare but I now
understand that bytes are an atomic C data type hence no need
for fancy routines.  (I feel a bit silly now)
I cant express enough my appreciation of your work,
all I have done is based on your examples.

Frank

>date: Tue, 19 Aug 2014 11:38:37 -0500
>from: Scott Klement <[email protected]>
>subject: Re: [C400-L] Struggling with API QDFRTVFD
>
>Maybe I'm not understanding, but... wouldn't it simply be like this?
>

>Since WDFFFIOA isn't a pointer, it's just a byte, can't you just check
>it directly?
>Sorry... I haven't following this whole conversation, so I might be
>missing something important.
>-SK
>
>>
>>I am converting it to C but I am stuck on converting this line of code
>> if        QDFFFINF.WDFFFIOA = x'01'
>>I coded it in C as a strncmp but I get this compile error.
>>
>>This is and example of the compile error I am getting.
>>  217
>>  218    17 |   if (strncmp(p_QDFFFINF->WDFFFIOA, Attrib, 1) == 0)
>>  218    17 +   if ((_STRNCMPNULL((p_QDFFFINF->WDFFFIOA),(Attrib),(1)))
==0) {
>>*=SEVERE==========> a - CZM0280  Function argument assignment between
types
>>"const char*" and "char" is not allowed.
>>  219    18 |    NumFlds += 1;
>>  220       |    }
>>Frank
-- 
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list
To post a message email: C400-L-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.