Вверх ↑
Главный модератор
Ответов: 2999
Рейтинг: 396
#1: 2021-01-25 11:20:30 ЛС | профиль | цитата
  Для разработчика важной информацией является поддержка средой тех или иных типов данных, которые он может использовать. Поэтому здесь приводится краткий обзор типов для разных сред семейства HiAsm.

Индексы типов данных

HiAsm4

const
data_null = 0;
data_int = 1;
data_str = 2;
data_data = 3;
data_combo= 4;
data_list = 5;
data_icon = 6;
data_real = 7;
data_color= 8;
data_script = 9;
data_stream = 10;
data_bitmap = 11;
data_wave = 12;
data_array = 13;
data_comboEx = 14;
data_font = 15;
data_matr = 16;
data_jpeg = 17;
data_menu = 18;
data_code = 19;
data_element = 20;
data_flags = 21;

data_object = 100;

HiAsm5

enum DataType {
data_null = 0,
data_int,
data_str,
data_data,
data_combo,
data_list,
data_icon,
data_real,
data_color,
data_script,
data_stream,
data_bitmap,
data_wave,
data_array,
data_comboEx,
data_font,
data_matr,
data_jpeg,
data_menu,
data_code,
data_element,
data_flags,
data_stock,
data_pixbuf,

data_count
};

HiAsm.NET

	public enum DataType
{
/// <summary>
/// Value not defined
/// </summary>
[Description("Null")]
data_null = 0,

/// <summary>
/// Represents a value as <see cref="System.Int32"/>
/// </summary>
[Description("Int32")]
data_int,

/// <summary>
/// Represents a value as <see cref="System.String"/>
/// </summary>
[Description("String")]
data_str,

/// <summary>
/// Represents a value as <see cref="HiAsm.TData"/>.
/// Implements a container for transferring values of different types between elements
/// </summary>
[Description("TData")]
data_data,

/// <summary>
/// Represents a value as <see cref="System.Int32"/>.
/// Accesses the value by index
/// </summary>
[Description("Byte")]
data_combo,

/// <summary>
/// Represents a value <see cref="System.String"/>.
/// Implements a list of strings
/// </summary>
[Description("List<string>")]
data_list,

/// <summary>
/// Represents a value as <see cref="System.Drawing.Icon"/>
/// </summary>
[Description("Icon")]
data_icon,

/// <summary>
/// Represents a value as <see cref="System.Double"/>
/// </summary>
[Description("Double")]
data_real,

/// <summary>
/// Represents a value as <see cref="System.Int32"/>.
/// Implements <see cref="System.Drawing.Color"/>
/// </summary>
[Description("Color")]
data_color,

/// <summary>
/// Represents a value as <see cref="System.String"/>.
/// Implements a script code
/// </summary>
[Description("Script")]
data_script,

/// <summary>
/// Represents a value as <see cref="System.IO.MemoryStream"/>
/// </summary>
[Description("Stream")]
data_stream,

/// <summary>
/// Represents a value as <see cref="System.Drawing.Bitmap"/>
/// </summary>
[Description("Image")]
data_bitmap,

/// <summary>
/// Represents a value as <see cref="System.IO.MemoryStream"/>.
/// Implements a media content
/// </summary>
[Description("Sound")]
data_wave,

/// <summary>
/// Represents a value as <see cref="HiAsm.ArrayValue"/>
/// </summary>
[Description("Array<T>")]
data_array,

/// <summary>
/// Represents a value as <see cref="System.Int32"/>.
/// Accesses the value by index
/// </summary>
[Description("Enumerate")]
data_comboEx,

/// <summary>
/// Represents a value as <see cref="HiAsm.FontRecord"/>.
/// Implements <see cref="System.Drawing.Font"/>
/// </summary>
[Description("Font")]
data_font,

/// <summary>
/// Not yet supported
/// </summary>
data_matr,

/// <summary>
/// Represents a value as <see cref="System.IO.MemoryStream"/>.
/// Stores a jpeg file format
/// </summary>
[Description("Jpeg")]
data_jpeg,

/// <summary>
/// Not yet supported
/// </summary>
data_menu,

/// <summary>
/// Represents a value as <see cref="System.String"/>
/// </summary>
data_code,

/// <summary>
/// Represents a value as <see cref="System.String"/>.
/// Accesses an element by key
/// </summary>
[Description("Delegate")]
data_element,

/// <summary>
/// Represents a value as <see cref="System.Int32"/>.
/// Implements flags list
/// </summary>
[Description("Flags")]
data_flags,

/// <summary>
/// Not yet supported
/// </summary>
data_cable,

/// <summary>
/// Not yet supported
/// </summary>
data_stock,

/// <summary>
/// Not yet supported
/// </summary>
data_pixbuf,

/// <summary>
/// Represents a value as <see cref="System.Object"/>.
/// </summary>
[Description("Object")]
data_object,

/// <summary>
/// Represents a value as <see cref="System.DateTime"/>.
/// </summary>
[Description("DateTime")]
data_time,

/// <summary>
/// Represents a value as <see cref="System.Boolean"/>.
/// </summary>
[Description("Boolean")]
data_bool,

/// <summary>
/// Represents a value as <see cref="System.Int64"/>.
/// </summary>
[Description("Int64")]
data_long,

/// <summary>
/// Represents a value as <see cref="System.Char"/>.
/// </summary>
[Description("Char")]
data_char,

/// <summary>
/// Represents a value as <see cref="System.Single"/>.
/// </summary>
[Description("Single")]
data_float,

/// <summary>
/// Represents a value as <see cref="System.Decimal"/>.
/// </summary>
[Description("Decimal")]
data_decimal,

/// <summary>
/// Represents a value as <see cref="IComponent"/>.
/// </summary>
[Description("Component")]
data_component,

/// <summary>
/// End-list marker
/// </summary>
data_count
}

  Таблица сравнения поддержки средой типов данных

ИндексИмяHiAsm 4HiAsm 5HiAsm.NET
0 data_null+++
1 data_int+++
2 data_str+++
3 data_data+++
4 data_combo+++
5 data_list+++
6 data_icon+++
7 data_real+++
8 data_color+++
9 data_script+++
10data_stream+++
11data_bitmap+++
12data_wave+++
13data_array+++
14data_comboEx+++
15data_font+++
16data_matr++-
17data_jpeg+++
18data_menu++-
19data_code+++
20data_element+++
21data_flags+++
22data_cable+-+
23data_stock-+-
24data_pixbuf-+-
25data_object--+
26data_time--+
27data_bool--+
28data_long--+
29data_char--+
30data_float--+
31data_decimal--+
32data_component--+
100data_object+--


  Важные замечания:
    в среде HiAsm 4 тип data_color ограничен для хранения только RGB цвета (24 бита на точку);
    индекс типа 22 используется для различных типов данных: data_cable (HiAsm 4 и HiAsm.NET) и data_stock (HiAsm 5);
    использование индекса типа данных в коде среды не означает его реальную функциональную поддержку;
карма: 6
Дорогу осилит идущий. Install/Update HiAsm.NET
1
Голосовали:lisnic
Редактировалось 3 раз(а), последний 2022-01-20 08:31:41