Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
language:types2:data [2024/07/18 16:17] – [Data types] rajitlanguage:types2:data [2024/07/18 16:23] (current) – [Structures] rajit
Line 1: Line 1:
-====== Data types ======+====== User-defined data types ======
  
-A data type is defined using ''deftype''. A data type corresponds +user-defined data type is defined using ''deftype''These are classified into two categories: 
-to an integer or Boolean value, although it could also be a composite +   * //data types//, which correspond to representations of the built-in ''int'' and ''bool'' types. 
-construct like a record or structure (from software programming +   * //structures//, which are a collection of data types. 
-languages). The syntax is similar to a process, and the constraints + 
-about declarations/etc. apply here as well.+===== Data types ===== 
 + 
 +A data type corresponds to an integer or Boolean value, even though it 
 +could also be a composite construct like a record or structure (from software 
 +programming languages). The syntax is similar to a process, and the constraints 
 +about declarations/etc. apply here as well.  These data types are handled as 
 +the underlying built-in ''int'' or ''bool'' that they correspond to at the CHP 
 +level of abstraction.
  
 Often data types have some additional structure that is not required for a Often data types have some additional structure that is not required for a
Line 112: Line 119:
 The distinction between a structure and another data type is that other data types are The distinction between a structure and another data type is that other data types are
 implementations of one of the built-in types like ''int'' or ''bool.''  implementations of one of the built-in types like ''int'' or ''bool.'' 
 +
 +==== Pure structures ====
 +
 +A pure structure is one that only contains other pure structures or ''int'' and ''bool'' components. 
 +In other words, they are structures that don't include channels. Structures like this correspond 
 +to what is normally viewed as a record/struct in a normal software programming language.
 +