ONC+ Developer's Guide

RPCL Strings

The C language has no built-in string type, but instead uses the null-terminated char * convention. In C, strings are usually treated as null-terminated single-dimensional arrays.

In XDR language, strings are declared using the string keyword, and compiled into type char * in the output header file. The maximum size contained in the angle brackets specifies the maximum number of characters allowed in the strings, not counting the NULL character. You can omit the maximum size, indicating a string of arbitrary length.

Examples:

string name<32>;   --> char *name;
string longname<>; --> char *longname;

NULL strings cannot be passed; however, a zero-length string (that is, just the terminator or NULL byte) can be passed.