ISO IEC 14957 pdf download – Information technology — Representation of data element values — Notation of the format

admin
ISO IEC 14957 pdf download – Information technology — Representation of data element values — Notation of the format

ISO IEC 14957 pdf download – Information technology — Representation of data element values — Notation of the format
This International Standard specifies the notation to be used for stating the format, i.e. the character classes,used in the representation of data elements and the length of these representations.lt also specifiesadditional notations relative to the representation of numerical figures. For example, this formating techniquemight be used as part of the metadata for data elements.
The scope of this International Standard is limited to graphic characters, such as digits, letters and specialcharacters. The scope is limited to the basic datatypes of characters,character strings, integers, reals,andpointers.
2Normative references
The following referenced documents are indispensable for the application of this document. For datedreferences,only the edition cited applies. For undated references,the latest edition of the referenceddocument (including any amendments) applies.
ISOIEC 10646:2003, Information technology — Universal Multiple-Octet Coded Character Set (ucs)
Terms and definitions
For the purposes of this document, the following terms and definitions apply.3.1
data element
unit of data that is considered, in context, to be indivisible
[ISO/IEC 2382-4:1999,04.07.01]
3.2
character set
finite set of characters that is complete for a given purpose
[ISO/IEC 2382-4:1999,04.01.02]
3.3
character type
set of characters of the same kind or having the same useEXAMPLE Letters, figures,special characters, etc.
3.4
length
length of representation
number of characters used to represent a data element
The format shall be a characterstring sequence.The format is composed of zero or more directives: one ormore space characters as defined in ISO/EC 10646:2003,Clause 20, an ordinary character (neither : nor aspace character), or a conversion specification.Each conversion specification is introduced by the character %.
NOTE This specification of formats is based upon the “fscanf()” function in the C programming language(ISO/IEC 9899:1999).
Conceptually, the format string implies a syntax processor that consumes syntactic units, as described by theformat directives. Because there is no service interface specified by this international Standard, there is noprescribed error handling for strings that do not match the formatting directives.
After the % , the following appear in sequence:
an optional assignment-suppressing character *;
– an optional nonzero decimal integer that specifies the maximum field width (in characters);
an optional length modifier that specifies the size of the receiving object;
– a conversion specifier character that specifies the type of conversion to be applied.Each directive of the format is processed in turn.
A directive composed of space character(s) is executed by reading input up to the first non-space character(which remains unread), or until no more characters can be read.
A directive that is an ordinary character is executed by reading the next characters of the stream. If any ofthose characters differ from the ones composing the directive,,the directive fails and the differing andsubsequent characters remain unread.
Similarly, if end-of-file, an encoding error, or a read error prevents a character from being read, the directivefails.
A directive that is a conversion specification defines a set of matching input sequences, as described belowfor each specifier. A conversion specification is executed in the following steps:
Input space characters are skipped, unless the specification includes a [, c, or n specifier.1
An input item is read from the stream, unless the specification includes an n specifier.An input item is definedas the longest sequence of input characters which does not exceed any specified field width and which is, oris a prefix of,a matching input sequence.
The first character, if any,after the input item remains unread. lf the length of the input item is zero, theexecution of the directive fails. This condition is a matching failure unless end-of-file, an encoding ermor, or aread error prevented input from the stream, in which case it is an input failure.
Except in the case of a t specifier,the input item (or,in the case of a ‘n directive,the count of inputcharacters) is converted to a type appropriate to the conversion specifier. lf the input item is not a matchingsequence,the execution of the directive fails: this condition is a matching failure. Unless assignmentsuppression was indicated by a *, the result of the conversion is placed in the object pointed to by the firstargument following the format argument that has not already received a conversion result. If this object doesnot have an appropriate type,or if the result of the conversion cannot be represented in the object, thebehavior is undefined.