Студопедия

КАТЕГОРИИ:

АстрономияБиологияГеографияДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРиторикаСоциологияСпортСтроительствоТехнологияФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника


Discrete types




 

The discrete types have the sequence of values with minimum and maximum values. The value which is not the last one has the next value, and the value which is not the first one has the previous value. To find previous and next values, special functions are provided.

 

Discrete range is the sequence of values with maximum and minimum values and functions of previous and next value definition.

Discrete types are the types having discrete range.

Integer and enumerated types are discrete.


Integer type

This type consists of values, which are called the integers numbers.

The images of integer values are known as integers numbers images. For example, 1, 8, 65, 3458.

For the integer types, arithmetic standard operations, relation operations, and base operations are predefined.


Enumerated type

This type consists of values which are obviously enumerated.

The character and the boolean types are enumerated types.


Character type

 

The character type is the one which values are enumerated in standard environment, in the ASCII table.

This type consists of 128 ordered values.

Value images of the character type are the images of characters, which are well known. These characters are put in quotes to distinguish the character images from others denotations and digital images. For example, “c”, “t” are the character type values denotations. For the character type values the base and standard operations are predefined.


Boolean type

 

This type is represented by two values which images are FALSE and TRUE.

These values are ordered in such a way that FALSE is less than TRUE. FALSE and TRUE are literal images of the boolean type.

For boolean type values, relation operations are predefined.


Real types

 

Values of these type are approximated representations of real numbers. These numbers are represented by a decimal fraction of the following kind:

 

N + 0. D1, D2... Dk,

 

where N is an integer, Di Ì {0, 1... 9}.

Such a kind of representation means that if the value of k is positive, the following inequality is true.

 

N + D1/10 + D2/100 +... + Dk/10k < x < N + D1/10 + D2/100 +... + Dk/10k + 1/10k...


Real values representation

 

Two ways of representation are used for value images of the real type:

 

1.The real type image consists of two parts. The first part (k) is located before the comma. The second part (l) is located after the comma. Thus, the value image is “k, l” and it has the length Lt = Lk + Le where Lt is the value image length, Lk is the K part length, Le is the E part length.

For example, 252,32 is the real type image.



Поделиться:

Дата добавления: 2015-09-13; просмотров: 77; Мы поможем в написании вашей работы!; Нарушение авторских прав





lektsii.com - Лекции.Ком - 2014-2024 год. (0.005 сек.) Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав
Главная страница Случайная страница Контакты