Structures

SymbEL supports the aggregate type struct, which is similar to the C variety, with some exceptions. An aggregate is a collection of potentially dissimilar objects collected into a single group. As it turns out, most of the SymbEL code developed will contain structures.

As an example, here is what a SymbEL password file entry might look like.

struct passwd {
  string pw_name; 
  string pw_passwd; 
  long   pw_uid; 
  long   pw_gid; 
  string pw_age; 
  string pw_comment; 
  string pw_gecos; 
  string pw_dir; 
  string pw_shell; 
};

The declaration of structure variables differs from C in that the word struct is left out of the variable declaration. So, to declare a variable of type struct passwd, only passwd would be used.

Accessing Structure Members

You access ...

Get Sun Performance and Tuning: Java™ and the Internet, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.