![]() |
Section 8.16.1.7: |
![]() |
This page defines two generic abstract classes named $FTEXT_STRING which have different numbers of class arguments
![]() |
This abstract class defines a state component which is a set of all instantiations of objects of any class sub-typing from this class in addition to the vdm model types used wherever this class name is used. Note that SAME has to be an instantiated class, not an abstract one.
NOTE | See the important note about vdm state in the notes on vdm-sl usage in this specification. |
This abstract class characterises the concept of a mutable text string as sequences of the argument class (elements) which must sub-type from $IS_EQ.
This feature is the cultural description and coding which is associated with the string. It need not be the default culture and coding for the environment in which the program is executing, since a program may manipulate culture objects independently of local textual representations.
Since the string has to exist then so does this component. The pre-condition, therefore, is vacuously true.
Thie is also vacuously true, since it is a component of every string of text.
This feature provides access to all of the cultural and environment dependencies relating to this character string.
![]() |
This abstract class defines a state component which is a set of all instantiations of objects of any class sub-typing from this class in addition to the vdm model types used wherever this class name is used. Note that SAME has to be an instantiated class, not an abstract one.
NOTE | See the important note about vdm state in the notes on vdm-sl usage in this specification. |
This abstract class characterises the concept of a mutable text string as a sequence of the argument class (elements) which must sub-type from $IS_EQ. The second and third class arguments are the 'corresponding' mutable ($FTEXT_STRING{ELT}) and self string classes.
The strip feature in this class needs the definition of a line mark - which is given below.
This feature replaces the one inherited from $BINARY which makes use of the execution environment default repertoire and encoding in building the resultant text string.
build | ( |
cursor : BIN_CURSOR | |
) : SAME |
This routine builds a new mutable string from the binary string indicated using the encoding and repertoire defined by the external execution environment. If there is not an exact number of character codes in the string then void is returned and the cursor has not been moved.
This feature makes use of the given encoding and repertoire rather than the execution environment default in building the resultant text string.
build | ( |
cursor : BIN_CURSOR, | |
lib : LIBCHARS | |
) : SAME |
This routine builds a new mutable string from the binary string indicated using the encoding and repertoire defined by lib. If there is not an exact number of character codes in the string then void is returned and the cursor has not been moved.
This feature provides a facility of removing line marks from the end of a string (if there are any there). Multiple line marks at the end will be removed, irrespectiv of any escaping mechanism.
strip | : SAME |
This post-condition uses the auxiliary function lmark defined above.
This feature removes as many line marks as are found at the end of the string, returning the result.
This iter version and the one following complement the one inherited by this abstraction. This permits the first element yielded to be the element indexed by the start argument.
Note that the formal name of the iter has been changed to replace the exclamation mark iter symbol to a name acceptable to vdm tools.
Since the iter may quit if start is not in the domain of indices of self, the pre-condition is vacuously true.
This post-condition makes use of the history concept from vdm++ (see the vdm dialect notes).
For quit actions see the specification of the quit statement.
This iter yields the elements of self in order beginning with the element at the given starting index.
This iter version specifies both the element to yield first and the number of elements to be yielded.
Note that the formal name of the iter has been changed to replace the exclamation mark iter symbol to a name acceptable to vdm tools.
Since the iter may quit if start is not in the domain of indices of self, the pre-condition is vacuously true.
This post-condition makes use of the history concept from vdm++ (see the vdm dialect notes).
For quit actions see the specification of the quit statement.
This iter yields num elements of self in order beginning with the element at the given starting index.
This iter yields the character encodings of self in sequence starting at the one indicated.
Note that the formal name of the iter has been changed to replace the exclamation mark iter symbol to a name acceptable to vdm tools.
Since the iter may quit when all elements have been yielded, the pre-condition is vacuously true.
This post-condition makes use of the history concept from vdm++ (see the vdm dialect notes).
For quit actions see the specification of the quit statement.
This iter yields in sequence the individual character encodings in self starting with the first.
This iter yields the character encodings of self in sequence starting at the one indicated.
Note that the formal name of the iter has been changed to replace the exclamation mark iter symbol to a name acceptable to vdm tools.
Since the iter may quit if start is not in the domain of indices of self, the pre-condition is vacuously true.
This post-condition makes use of the history concept from vdm++ (see the vdm dialect notes).
For quit actions see the specification of the quit statement.
This iter yields in sequence the individual character encodings in self starting with the one indicated.
![]() |
Language Index | ![]() |
Library Index | ![]() |
String Index |
Comments or enquiries should be made to
Keith
Hopper. Page last modified: Wednesday, 29 November 2000. |
![]() |