Previous: Modules Up: Modules and Assignments Next: Value Assignment

Type Assignment

  A type assignment consists of a type reference (the name of the type), the character sequence ::= (‘‘is defined as’’), and the appropriate type. Each of the components must be separated by at least one space. The type reference must be a character string consisting of only upper and lower case letters, digits 0 to 9, or a hyphen. None of the other ASN.1 characters : ; = , < . ( ) [ ] ' " may be used. A type reference must begin with an upper case letter, not end with a hyphen, and not contain two consecutive hyphens. Comments in ASN.1 begin with two consecutive hyphens and end either with two consecutive hyphens or the end of a line. In the module body (from the below Figure that was repeated from the previous page), the name ItemId has type SEQUENCE and StoreLocation has type ENUMERATED. There are four component values in the sequence: partnumber, quantity, wholesaleprice, and saleprice. StoreLocation has the three component values Baltimore, Philadelphia, and Washington.

	 InventoryList {1 2 0 0 6 1} DEFINITIONS ::=
	      ItemId ::= SEQUENCE
	         partnumber IA5String,
	         quantity INTEGER,
	         wholesaleprice REAL,
	         saleprice REAL
	      StoreLocation ::= ENUMERATED
	         Baltimore (0),
	         Philadelphia (1),
	         Washington (2)

This site was developed from:
Computer Networks and Open Systems
An Application Development Perspective

Lillian N. Cassel
Richard H. Austing

Jones & Bartlett Publisher
ISBN 0-7637-1122-5

This site is hosted by:

Real World ASN.1 and XML Solutions