![]() type is the type of value stored in the elements of the array (char, integer, real, string, etc.) and.high_value is the upper bound of the array.low_value is the lower bound of the array.Identifier: array of type = ( values ) identifier … real, etc.) or character based (char, string, ansistring, etc.)įor one-dimensional array constants the general format is: All of the values must be the same type, whether it is a number (byte, word, integer. ![]() The values assigned can be literals or may be a scalar constant.įor how to describe a constant array of record, see the section below.Īrray constants work much the same as scalar constants, except multiple values can be specified. If a record value is missing the compiler will warn of an uninitialized value. Note that fields must be initialized in the same order that they are declared (or the compiler will flag an error). They cannot be used as the target of an assignment statement, and they cannot be passed as a VAR parameter in a call to a procedure, function, method or property. ![]() They will be explained in greater detail in separate sections below.Ī constant, whether a scalar, a record field, or an array subscript, may be used in place of a literal of the same type, or may be used anywhere a variable may be used with two exceptions. A record constant is a single identifier holding one or more separate values in a structured form. A scalar constant is a single identifier which is assigned a single value. The value stored in a constant cannot be changed.Ĭonstants come in three flavors: Scalars, records, and arrays. │ български (bg) │ Deutsch (de) │ English (en) │ français (fr) │ italiano (it) │ 日本語 (ja) │ 한국어 (ko) │ русский (ru) │ 中文(中国大陆) (zh_CN) │ġC - Constants (author: Tao Yue, state: changed)Ĭonstants are referenced by identifiers, and can be assigned one value at the beginning of the program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |