[ANSYS, Inc. Logo] return to home search
next up previous contents index

A.6 User-Defined Data Types

C also allows you to create user-defined data types using structures and typedef. (For information about structures in C, see [ 6].) An example of a structured list definition is shown below.

figure   

typedef can only be used for compiled UDFs.



Example


 typedef struct list{int a;
                     real b;
                     int c;} mylist; /* mylist is type structure list 
 mylist x,y,z;                          x,y,z are type structure list */


next up previous contents index Previous: A.5.3 Static Variables
Up: A. C Programming Basics
Next: A.7 Casting
Release 12.0 © ANSYS, Inc. 2009-01-14