× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



"Bartell, Aaron L. (TC)" wrote:
> 
> To go along with Scott and Joe's comments I am fairly certain you cannot
> use a VARYING field as a parm to a C API.  This is because the first two
> chars of the variable contain it's length and since C doesn't support
> RPG's version of VARYING length fields it thinks those first two bytes
> are part of the file path/name.
> 
> I may be wrong, but I struggled with this some time ago and I think that
> is what I came up with.
> 

Aaron, the rule about not using VARYING when calling a C API applies to
the prototype of the C function, which describes what the C function is
expecting.

(It's only a rule of thumb.  A C program can support RPG's varying
length if you want, but you would have to define your own C struct to
map to the type.)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.