Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What does BINARY(4) mean in API documentation?How do I map from C prototypes to RPG?

0
10 Posted

What does BINARY(4) mean in API documentation?How do I map from C prototypes to RPG?

0

Scott Klement posted this to the RPG400-L list 02 Nov 1999:Basically, in the phrase CHAR(*), the * can be replaced with ANY number. You can pass a variable thats 20 chars long, or 1000 chars long… usually, as in this case, you tell the API the length of the field in a seperate parameter.The same goes for the phrase “ARRAY(*) of BINARY(4)” The number of things in that array vary… In the case, you’re telling it the number of system values that you’d like the value returned for, so you’ll know how many elements that array will have…The other confusing thing about this particular API is that different system values will return different data types that are of different lengths…The way that I deal with this issue is by creating a sub-proc that simply copies the value returned by the API to a pointer thats passed as a parameter. Then when I’m writing my program that uses the API, I pass the address of a variable thats of the correct type for the system value that I’m retrieving…Her

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.