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

Data Types

The syntax of data types is:

data-type:
	byte
	int
	big
	real
	string
	tuple-type
	array of data-type
	list of data-type
	chan of data-type
	adt-type
	ref adt-type
	module-type
	module-qualified-type
	type-name
data-type-list:
	data-type
	data-type-list, data-type
Objects of most data types have value semantics; when they are assigned or passed to functions, the destination receives a copy of the object. Subsequent changes to the assigned object itself have no effect on the original object. Value types are byte, int, big, real, string, the tuple types, and abstract data types (adt). The rest have reference semantics. When they are assigned, the quantity actually assigned is a reference to (a pointer to) an underlying object that is not copied; thus changes or operations on the assigned value change the original object. Reference types include lists, arrays, channels, modules, and ref adt types.



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

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