What does BINARY(4) mean in API documentation?How do I map from C prototypes to RPG?
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