ONC+ Developer's Guide

RPCL Fixed-Length Array Declarations

Fixed-length array declarations are just like C array declarations.

fixed-array-declaration:
      type-ident variable-ident [value] 

Example:

colortype palette[8]; --> colortype palette[8];

Many programmers confuse variable declarations with type declarations. Note that rpcgen does not support variable declarations. The following example is a program that does not compile.

int data[10];
program P {
   version V {
      int PROC(data) = 1;
 	} = 1;
} = 0x200000;

The previous example does not compile because of the variable declaration:

int data[10]

Instead use:

typedef int data[10];

or

struct data {int dummy [10]};