Previous: Differences from Fortran Up: C Calling Sequence
The standard C definitions for each of the VICAR pixel data types are listed in Table . The data types that may be passed in to the RTL, and the C declarations for each type, are listed in Table . These RTL data types are referred to in Section , Summary of Calling Sequences.
Special attention should be paid to the passing of string arrays. Since labels and parameters can have more than one value, the routines that deal with them must be able to accept (or output) arrays of strings. The RTL convention is that all arrays of strings are expected to be two-dimensional arrays of ``char''. This does not mean an array of pointers to strings; be very careful of that. It does mean a pointer to an area of memory n*m bytes long, where n is the maximum size of each string and m is the number of strings. The inner dimension, n, must be passed in to the routine so it knows how to access the string array. All RTL routines that use string arrays have a way to specify the length. Note that the length is the size of the inner dimension; it is not the length of any particular string. In other words, the length includes space for the null terminator at the end of a string. If you know the maximum size of any string is 10 characters, make sure the length is at least 11 to include room for the null terminator.