国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

VHDL數據類型(Data Types)

2019-11-08 01:51:27
字體:
來源:轉載
供稿:網友

數據類型(Data Types)

數據類型用來指示該點多使用的類型。VHDL中共有4類類型: A data type appears in a declaration to identify the type used at that point. There are four classes of types in VHDL:

標量類型:表示一個單獨的數字值,枚舉類型。標準類型有: 枚舉類型浮點型整型物理類型Scalar types: rePResent a single numeric value, or in the case of enumerated types, an enumeration value. The standard types that fall into this class are: Enumeration Floating Point Integer Physical復合類型:表示數值的集合。其標準類型有以下幾種: 數組記錄Composite types: represent a collection of values. The standard types that fall into this call are: ArrayRecord訪問類型提供對象的訪問入口,類似于一些軟件編程語言的指針。access type provide access to objects, equivalent to pointers in software programming languages. -文件類型表示對象(典型的如硬盤文件)包含一系列值。 File type reference objects (typically disk files) that contain a sequence of values. 你可以基于上述類型的基礎上自定義自己的類型,或者使用subtype關鍵字來約束已存在的類型。 You can define your own type based on one of the classes mentioned above, or constrain an existing type with the subtype keyWord.

枚舉類型(Enumeration Type)

枚舉類型是一組具有明確值的集合。枚舉中的值是一個命名項或者一個字符。 The enumeration type is a type whose values are defined by listing all possible values explicitly. Each value is either a name or a character.

語法(Syntax)

type 枚舉名 is ( 枚舉元素, 枚舉元素, ... );type new_name is ( type_element, type_element, ... );

說明(Description)

枚舉類型是一個有序值的集合,也稱為枚舉文字,連續的標識符或字符文字。相同值不允許出現在同一類型中,但是可以出現在不同的枚舉類型中。這種情況被稱為重載。 The enumeration type is a type with an ordered set of values, called enumeration literals, and consisting of identifiers and character literals. The same value cannot appear twice in the same type, but may appear in two (or more) different enumeration types. This is called overloading. 所有的枚舉值都是有序的,并且有一個數字(整數)與之對應。數字值指示該枚舉值在列表中的位置。枚舉類型中第一個值的位置值為0,后面的值依次加一。 All enumerated values are ordered and each of them has a numeric (integer) value assigned to it. This number indicates the position of the value in the list. The first value in the definition has position number zero and each subsequent has the number increased by one from its predecessor.

例程(Example)

type FSM_States is (idle, start, stop, clear); type std_ulogic is ('U', 'X', '0', '1', 'Z', 'W', 'L', 'H', '-');

注釋(Notes)

定義有范圍的枚舉類型是不合法的。It is illegal to define an enumeration type with a range.列表中的字符值是可打印字符,且用單引號包圍。A character in the list of values is a printable charter enclosed in single quotes! 標準庫中聲明了一些預先定義的枚舉類型。The package Standard contains declarations of several predefined enumeration types.

浮點類型(Floating Point)

浮點類型提供實數的近似值。 A floating point type provides an approximation to the real numbers.

語法(Syntax)

type 浮點名 is 實數最大值 downto 實屬最小值; -- 降序 type 浮點名 is 實屬最小值 to 實屬最大值; -- 升序type new_name is range real_number_left_bound downto real_number_right_bound; -- descending type new_name is range real_number_left_bound to real_number_right_bound; -- ascending

說明(Description)

浮點類型是由實數組成的數字類型,它的值具有特定的范圍。 A floating point type is a numeric type consisting of real numbers which values are constrained by a specified range. 目前僅有一種浮點類型:real。實數類型值的范圍取決于實現工具,但是它的范圍必須在標準范圍-1.0E38到+1.0E38之間。 There exists only one predefined floating point type: Real. The range of the values for the type Real are implementation-dependent, but it is required by the standard that it covers the values from -1.0E38 to +1.0E38. 用戶定義的浮點類型建立于預定義實數類型的基礎上,通過約束其范圍來創建。用戶定義浮點類型的范圍邊界必須是靜態的浮點類型表達式。 A user-defined floating point type can be constructed on the basis of the predefined Real type by constraining its range. The bounds of the range of a user-defined floating point type must be static floating point type expressions. 所有浮點類型(包括用戶定義的)具有相同的算術運算符集,即:加、減、乘、除、取絕對值和冪運算。 All floating point types (including user-defined) have the same set of arithmetic Operators, namely: addition, subtraction, multiplication, division, absolute function and exponentiation.

例程(Example)

type InputLevel is range -6.55 to +12.35; type Int64K is range -65536.00 to 65535.00;

注釋(Note) - 浮點類型不能被綜合。浮點類型被用于高層次的仿真。 - The floating point types are not synthesizeable. The floating point type is used for high level simulations.

整型(Integer) 整型是包含指定范圍整數的數量集。 The integer type is a scalar whose set of values includes integer numbers of the specified range.

語法(Syntax)

type 整型名 is 整數最小值 to 整數最大值; type 整型名 is 整數最大值 downto 整數最小值; type type_name is integer_left_bound to integer_right_bound; type type_name is integer_left_bound downto integer_right_bound;

說明(Description)

整型是由一定范圍的整數組成的數字類型。只有一種預定義的整型,其大小范圍為+/-(2E31 - 1)。 An integer type is a numeric type which consists of integer numbers within the specified range. There is only one predefined Integer type, and that is type Integer which range depends on the implementation, but must cover at least the range +/-(2E31 - 1).

用戶定義的整型可以通過約束其范圍,基于預定義的整型來構建。 A user-defined integer type can be constructed on the basis of the predefined Integer type by constraining its range. 所有整型(包括用戶定義的)都具有相同的在標準包中定義的算術運算集,即加、減、乘、除、取模和取余。在所以情況下,操作符和結果都是整型。 All integer types (including user-defined) have the same set of arithmetic operators, defined in the package Standard, namely: addition, subtraction, multiplication, division, modulus, and remainder. In all cases both operands and the result are of the integer type. 整型的關系運算符有:等、不等、大于、大于等于、小于等于。關系運算的結構是布爾型(boolean type)。 Relations can be checked on integer operands: equal, unequal, greater than, less than, greater or equal than, and less or equal than. In all cases, the result is of the Boolean type.

例程(Example)

type Level is range 0 to 7; type Int_64K is range -65536 to 65535; type WORDS is range 31 downto 0;

注釋(Note)

給整型賦的值超過其范圍則導致錯誤。It is an error to assign to an integer object a value which is from outside its range.

物理類型(Physical Type)

物理類型表示具有物理單位的整數值。 A physical type represents an integer value together with a physical unit.

語法(Syntax)

type 物理類型名 is 左邊界 to 右邊界units 主單位名; 次級單位名 = 量級值 主單位名; ...end units [物理類型名]type 物理類型名 is 左邊界 downto 右邊界units 主單位名; 次級單位名 = 量級值 主單位名; ...end units [物理類型名]type new_name is range left_bound to right_bound units primary_unit_name; secondary_unit_name = number primary_unit_name; ...end units [ new_name ]; type new_name is range left_bound downto right_bound units primary_unit_name; secondary_unit_name = number primary_unit_name; ...end units [ new_name ];

說明(Description) 物理類型允許給一些物理量定義測量單位,如長度、時間、壓強,電容等。 A physical type allows to define measurement units for some physical quantity, like length, time, pressure, capacity, etc. 物理類型的聲明以定義一個主單位開始,后面可以選擇有一個或多個次級單位。主單位一般表示該指定類型的主單位。次級單位被定義為主單位的倍數或者前面定義的次級單位的倍數。他們的聲明只能是整型。 A physical type declaration starts with the definition of a primary unit, which is optionally followed by, one or more secondary units. The primary unit serves as the base unit for representing values of the specified type. The secondary units are defined as multiplicity of primary units or previously specified secondary units. Their declarations may contain only integer literals. 每個物理類型的值都有一個相對于主單位的位置編號。所以,同一類型不同單位的值可以進行比較。 Each value of a physical type has a corresponding position number, which is the number of primary units represented by that unit name. This way values specified in different units of the same type can be compared.

例程(Example)

type Capacity is range 0 to integer'highunits pF; -- picofarad nF = 1000 pF; -- nanofarad uF = 1000 nF; -- microfarad mF = 1000 uF; -- milifarad F = 1000 mF; -- farad end units;

注釋(Notes)

物理類型不可被綜合。Physical types are not synthesizeable.浮點值不允許用于物理類型的聲明。例如,如果要實現毫米到英尺(25.4mm = 1in)的轉換,則毫米不能用作基本單位。It is not allowed to use floating point values in physical type declarations, i.e. if a conversion from millimeters to inches (25.4 mm = 1 in) would have to be performed, then millimeters could not be used as the base unit. 僅推薦使用的物理類型為時間。The only commonly used physical type is Time.

數組(Array) 數組類型由具有相同基本類型的矢量集或多維集合構成。 A data type which consists of a vector or a multi-dimensional set of values of the same base type.

語法(Syntax)

type 數組名 is array ( 范圍, ... ) of 數據類型 -- 有約束條件type 數據名 is array ( type range <>, ... ) of 數據類型 -- 無約束條件type array_name is array ( range, ... ) of data_type -- constrainedtype array_name is array ( type range <>, ... ) of data_type -- unconstrained

說明(Description) 數組是一個復合對象,它的元素都有相同的子類型。每個元素都有一個唯一的索引值。索引值的多少也就是其維度的大小,例如一維數組有一個索引值,二維數組有兩個索引值。 An array is a composite object, which elements are of the same subtype. Each element is uniquely distinguished by an index. The number of indices is the number of dimensions, i.e. one-dimensional array has one index, two-dimensional has two indices, etc.

數組可以有約束條件也可以無約束。如果數組的大小被約束則該數組為有約束的數組。數組的大小可以用離散類型標記或者范圍來約束。 An array may be either constrained or unconstrained. The array is constrained if the size of the array is constrained. The size of the array can be constrained using a discrete type mark or a range. 如果數組的大小不定則該數組為無約束數組,無約束數組的大小以離散類型名字的形式來聲明,其范圍時不定的。無約束數字類型的元素個數是不定的。 The array is said to be unconstrained if its size is unconstrained: the size of the unconstrained array is declared in the form of the name of the discrete type, which range is unconstrained. The number of elements of unconstrained array type is unknown. 數組中的值可以通過索引名或者片名來進行讀寫。 The values within an array can be read or written using an indexed name or a slice name.

例程(Example)

subtype Byte is std_logic_vector(7 downto 0); type Mem is array (0 to 63) of Byte; variable Memory : Mem; ... if Read then Data <= Memory(to_integer(Address)); elsif Write then Memory(to_integer(Address) := Data; end if;

注釋(Notes)

-大部分綜合工具不支持多維數組(“vectors of vectors“形式的二維數外 ) - Most synthesis tools do not support multidimensional arrays (one exception to this is two-dimensional “vectors of vectors”).

記錄(Record)

由已命名元素構成的復合類型。 A composite type whose values consist of named elements.

語法(Syntax)

type 記錄名 is record 元素名, ... : 數據類型; ...end record [ 記錄名 ]; type record_name is record element_name, ... : data_type; ...end record [ record_name ];

說明(Description)

記錄表示不同類型值的集合。他和數組最大的區別在于數組的值必須是相同類型。記錄的所有元素都有其各自的名字。每個記錄中元素的名字必須是唯一的,相同的元素名可在不同的記錄中使用。 The record represents a set of values of different types. This is the main difference from arrays, which must have all elements of the same type. All elements are declared with individual names. The names of elements in each record must be distinct. However, the same element name can be used in different records. 記錄類型對象的值是一個復合值,由其元素的值構成。給記錄類型賦值可以對整個記錄類型賦值,也可以是對獨立的元素賦值(通過名字來選取)。 The value of an object of type record is a composite value, consisting of the values of its elements. The assignment of a value to an object of the type record can be realized either through an aggregate or through individual assignments to elements (selected names). 當給記錄類型的元素賦值時,使用記錄名加點加上元素名來選取該元素。 When individual assignment to elements is used then each element is referenced by the record name followed by a dot and element’s name.

例程(Example)

type Person is record FirstName: string (1 to 20); Married: boolean; Children: natural;end record;variable V1, V2: Person;V1.Children:= 1;V2:= ("John", false, 0);

注釋(Note)

文件不允許作為記錄的元素。Files are not allowed as elements of records.

訪問(Access) 訪問類型允許動態的內存分配。訪問類型值有內存分配算符返回(等同于C或者Pascal里的指針)。 A type that allows dynamic memory allocation. An access value is returned by an allocator (equivalent to pointers in C or Pascal)

語法(Syntax)

type type_name is access data_type;type incomplete_type_name;

說明(Description)

訪問類型可以靈活地處理數據,在事先不知道其確切大小的前提下,在仿真時動態地創建。任何對訪問類型的引用都通過分配運算符來實現,其工作機制類似于編程語言中的指針。 Access type allows to manipulate data, which are created dynamically during simulation and which exact size is not known in advance. Any reference to them is performed via allocators, which work in a similar way as pointers in programming languages.

只有變量類型的對象允許是訪問類型。 The only objects allowed to be of the access type are variables. 訪問類型的默認值為空(null)。 The default value of an access type is null.

對于每個不完全類型的聲明都必須對應一個相同名字的完全類型聲明。而且兩者必須在同一個地方聲明。在完全類型沒有聲明完成前,定義的訪問類型不能被使用。 For each incomplete type declaration there must be a corresponding full type declaration with the same name. The complete declaration must appear in the same declarative part. A type declared as incomplete may not be used for any other purposes than to define an access type before the complete type definition is accomplished.

例程(Example)

--declaration of recordtype DataRecord is record Data: std_logic_vector(15 downto 0); NextData: Link;end record;-- declaration of the access typetype Link is access DataRecord; variable StartOfRecords, Ptr: Link;

文件(File)

文件聲明表示一個特定的文件類型。 A file declaration declares a file of the specified type.

語法(Syntax)

type 新文件名 is file of 類型名;file 新文件名: 數據類型 [ [ open 打開方式 ] is 文件名 ];打開方式 = 只讀 | 只寫 | 追加 file 新文件名: 數據類型 is [ 打開模式 ] 文件名; -- 僅VHDL'87 打開模式 = 輸入 | 輸出 -- 僅VHDL'87 文件名 = 字符串表達式type new_name is file of type_name;file new_name: data_type [ [ open file_kind ] is file_name ];file_kind = read_mode | write_mode | append_mode file new_name: data_type is [ mode ] file_name; -- VHDL'87 only mode = in | out -- VHDL'87 onlyfile_name = string_expression

說明(Description)

文件聲明創建一個或多個指定類型的文件對象。文件聲明可以在任何對象可創建的地方進行,如結構體主體、進程、塊、包或子程序中。 The file declaration creates one or more file objects of the specified type. Such a declaration can be included in any declarative part in which the objects can be created, that is within architecture bodies, processes, blocks, packages or subprograms.

可選擇參數打開模式(file_kind)可以允許指定如何訪問打開的文件。打開模式的值必須是在標準包中預定義的值(file_open_kind)。 The optional open file_kind allows specifying how the physical file associated with the file object should be opened. The expression must have the predefined type file_open_kind value, which is declared in the Standard package. 文件名(file_name)必須是字符串表達式。文件名將外部主機文件系統中的文件與文件對象相關聯。這種關聯提供了一種機制,用于在仿真期間把外部文件數據導入到設計中,或者在將生成的數據導出到外部文件。 The file_name must be an expression of predefined type String. The file_name identifies an external file in the host file system that is associated with the file object. This association provides a mechanism for either importing data contained in an external file into the design during simulation or exporting data generated during simulation to an external file.

以下是為所有文件類型定義的子進程和函數: The following procedures and functions are defined for all file types:

procedure file_open (file F: FT; external_name: in string; open_kind: in file_open_kind := read_mode); procedure file_open (status: out file_open_status; file F: FT; external_name: in string; open_kind: in file_open_kind := read_mode); procedure file_close (file F: FT); procedure read (file F: FT; value: out TM); procedure write (file F: FT; value: in TM); function endfile (file F: FT) return BOOLEAN;

例程(Example)

type DataFile is file of string;file F: DataFile open write_mode is "FileName"; -- VHDL'93 file F: DataFile is out "filename"; -- VHDL'87

Notes:

指向同一外部文件的文件對象必須是相同的基礎類型。All file objects associated with the same external file should be of the same base type. VHDL’87和VHDL’93的文件聲明方式不同。File declarations are incompatible between VHDL’87 and VHDL’93.通常使用Textio包來讀寫文件。Always use package Textio to read or write files.

類型(Type)

數值集或操作符集。 A set of values and a set of operations.

語法(Syntax)

type 類型名 [ is 數據類型 ]; type type_name [ is data_type ];

說明(Description)

所有的信號、變量、常量(如對象)和表達式都有類型。類型決定了對象或表達式可以取的數值集合。類型同樣可以決定對象或表達式可用的操作符集合。 All signals, variables, constants (i.e. objects) and expresssions have a type. The type defines the set of values that the object or expression can have. A type also determines the set of operations which can be performed on an object or expression.

VHDL中有四類類型: There are four classes of types in VHDL:

標量類型:表示一個單獨的數值,或者枚舉類型中的枚舉值。scalar types: represent a single numeric value, or in the case of enumerated types, an enumeration value. 復合類型:表示一些值的集合。composite types: represent a collection of values.訪問類型:為給定類型的對象提供訪問接口。access types: provide access to objects of a given type.文件:為給定類型的特定序列值對象(典型的如硬盤文件)提供訪問接口。files: provide access to objects that contain a sequence of values of a given type (typically disk files).

除了預定義的類型外(標準庫,std_logic_1164和numeric_std),用戶可以定義自己的類型。用戶定義的類型可以是上述四類類型的任何一個。 Apart from predefined types (available through the packages Standard, Std_logic_1164 and Numeric_std), the user can define his own types. A user-defined type can be of any of the four classes mentioned above.

不同類型的值不能賦值給不同類型的對象。如果需要給不同類型的對象賦值,則需要強制轉換。 A value of one type cannot be assigned to an object of a different type. If a translation from one type to another is required, then type conversion must be applied.

例程(Example)

type State is (TReset, TWait, THold, THalt);

注釋(Notes)

VHDL是強類型化的語言,即已相同方式定義的兩個類型,如果其名字不同,則被認為不同的類型。VHDL is a strongly typed language which causes that two types defined in exactly the same way (i.e. lexically identical) but differing only by names will be considered different. 對象的初始值為該類型的左最值。例如枚舉類最左邊的值。The initial value of an object is the left most value of the type, i.e. the value on the left of the base enumeration.

子類型(Subtype)

有約束的類型。 A type together with a constraint.

語法(Syntax)

subtype subtype_name is data_type;

說明(Description)

子類型與其基本類型相兼容,且共享相同的操作符。 A subtype is compatible with its base type and shares the same operations.

指定類型的子類型值是在約束條件范圍內的類型值。類型也是其自身的自類型。這種自類型被稱為無約束的,因為他們滿足不限制的條件。 A value belongs to a subtype of a given type if it belongs to the type and satisfies the constraint. A type is a subtype of itself. Such a subtype is said to be unconstrained because it corresponds to a condition that imposes no restriction. 在標準庫中有兩個預定義的自類型:Natural和Positive。兩者都是整型的自類型。Std_logic_1164同樣也有子類型的聲明,包括std_logic的子類型。 There are two predefined subtypes specified in the package Standard: Natural and Positive. Both are subtypes of the type Integer. The package Std_logic_1164 also contains declarations of subtypes, which are constrained subtypes of the std_logic.

例程(Example)

subtype Digits is integer range 0 to 9; subtype MyBit is std_logic range '0' to '1'; subtype MyVector is std_logic_vector(2 downto 0);

注釋(Notes)

子類型聲明并不產生新類型。A subtype declaration does not define a new type.在仿真工具為仿真寄存器設置一個數值時,強烈建議使用枚舉和整型的自類型。Using subtypes of enumerated and integer types for synthesis is strongly recommended as synthesis tools infer an appropriate number of bits in synthesized registers, depending on the range.

預定義類型(Predefined Types)

VHDL LRM在標準庫中定義了一些數據類型,如布爾型(boolean),位(bit),位向量(bit_vector)和字符串(string)。 The VHDL LRM defines a few data types in the Standard pacakage such as Boolean, Bit, Bit_vector and String.

布爾型(Boolean)

布爾類型在標準庫中的定義為枚舉數據類型,有兩個可能的值:假(false)和真(ture)。 The boolean type is predefined in the Standard package as an enumerated data type with two possible values: false and true.

語法(Syntax)

type boolean is (false, true);

說明(Description)

布爾類型用于條件運算。布爾對象可用于任何關系運算符,如<,>,<=,>=,= 或者/=。 The boolean type is used for conditional operations. Boolean objects can be used with any of the relational operators <, >, <=, >=, = or /=. 任何布爾類型對象的默認值為假(false)。 The default value of any object of the boolean type is false.

例程(Example)

signal Condition: boolean; Condition <= true;if Condition then ... {is equivalent to: if Condition = true then ...}

注釋(Note)

布爾值(假和真)不同于邏輯0和1.在VHDL中,邏輯0和1是位類型。Boolean values (false and true) are not identical to logical 0 and 1, respectively. In VHDL, the logical 0 and 1 are of the bit type.

位(Bit)

在標準包中位類型的定義也是一個枚舉數據類型,有兩個允許值:‘0’和‘1’。 The bit type is predefined in the Standard package as an enumerated data type with only two allowable values: ‘0’ and ‘1’.

語法(Syntax)

type bit is ('0','1');

說明(Description)

位類型是用于表示邏輯值的基本類型。值得注意的是位類型只有兩個已定義的值。不能用戶高阻態和其他非平常值,如未知,弱阻性等。 The bit type is the basic type to represent logical values. Note that there are only two values defined for the bit type and it is not possible to use it for high impedance and other non-trivial values such as Unknown, Resistive Weak, etc. (see Std_logic).

位類型對象的默認值為‘0’。 The default value of any object of the bit type is ‘0’.

例程(Example)

signal A, B: bit; ... A <= '1'; B <= not A;

注釋(Notes)

位類型的值‘0’和‘1’不等同于布爾類型值。Bit type values ‘0’ and ‘1’ are not identical to the Boolean values (false and true), respectively. 位類型對象的邏輯值必須用單引號包圍,來區別于整數。Logical values for an object of the bit type must be written in quotes to distinguish them from Integer values.

位向量(Bit_Vector)

位向量是由位類型元素組成的一維數組。位向量類型也在標準包中預定義。 The bit_vector is a one-dimensional array type with elements being of type Bit. The bit_vector type is predefined in the Standard package.

語法(Syntax)

type bit_vector is array (natural range <>) of bit;

說明(Description)

位向量類型是無約束的向量。聲明時指定向量的大小。 The bit_vector type is an unconstrained vector. During the declaration the size of a vector is specified. 給位向量賦值方法等同于其他數組的復制方法。 Assignments to a bit_vector can be done in the same way as in case of any arrays (using single element assignments, concatenation, aggregates, slices or any combination of the previous methods).

位向量類型是未決定的類型,因此在結構體中只能有一處賦值的地方。 The bit_vector is an unresolved type and therefore any object of this type can have only one assignment in an architecture.

例程(Example)

signal Bus : bit_vector(7 downto 0); Bus(0) <= '1'; Bus <= ('1', others => '0'); Bus <= Bus(6 downto 0) & Bus(7); Bus <= "01110010";

注釋(Notes)

位向量類型的邏輯值必須用雙引號包圍。Logical values for objects of the bit_vector type must be written in double quotes. 位向量中單個元素是位類型,因此所有對單個元素的值必須用單引號包圍。Single elements are of the bit type, therefore all values assigned to single elements are specified in single quotes.

字符串(String)

在標準包中,字符串類型被預定義為字符類型的一維數組。 The string type is predefined in the package Standard as a standard one-dimensional array type with each element being of the type Character.

語法(Syntax)

type string is array (positive range <>) of character;

說明(Description)

字符串類型是一個字符類型的無約束向量。聲明時,必須指定字符串中字符的數量。字符串的賦值和數組的賦值相同。 The type String is an unconstrained vector of elements of the type Character. The number of characters in a string must be specified during its declaration. Assignments to a String can be done in the same way as in case of any arrays, i.e. using single element assignments, concatenation, aggregates, slices or any combination of them. 字符串可以有表示二進制,十進制或十六進制,的標識。 B“數值” – 二進制 O“數值”– 十進制 X“數值” –十六進制 A String can have an explicit number base for Binary, Octal or Hexadecimal values. B”value” – binary O”value” – octal X”value” – hexadecimal

例程(Example)

"hello world" "0000XXXX"B"0010_1100"

注釋(Notes)

字符串的書寫形式用雙信號包圍。單個元素是字符類型,所以用單引號包圍。Strings are written in double quotes. Single elements, however, are of the type Character, therefore values assigned to single elements (referred by the index) are specified in single quotes. 字符串區分大小寫。Strings are case sensitive.
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 东兴市| 博白县| 巴青县| 四平市| 南阳市| 通城县| 安西县| 新建县| 新昌县| 桓台县| 疏附县| 教育| 东宁县| 丰城市| 广南县| 灵山县| 南汇区| 阜城县| 凤城市| 玉屏| 浦北县| 拜城县| 凤阳县| 乐东| 金华市| 集安市| 淮南市| 普宁市| 峨边| 昌江| 东兴市| 新安县| 萨迦县| 敦煌市| 新丰县| 盖州市| 三河市| 册亨县| 峨山| 丰镇市| 昌乐县|