[Contents]
[Prev] [Next] [Limbo Basics] [Limbo Programming] [Language Definition]

Declaring a Channel

The following statement declares a channel:

	c : chan of int;

This declares a channel named c that transports int values. Channels are a reference type, so there is no associated storage following the declaration. Its value is nil.

To initialize a channel and make it ready to send or receive data, you must use the assignment statement:

	c = chan of int;



[Contents]
[Prev] [Next] [Limbo Basics] [Limbo Programming] [Language Definition]

Copyright © 1998, Lucent Technologies, Inc. All rights reserved.