home *** CD-ROM | disk | FTP | other *** search
-
-
- Comments on Porting
- Dynamic String Package
- by WIS JPMO
- to DEC Ada
-
- Tool 29
- August 20, 1985
-
- COMPILATION
- -----------
- The file DYN.SRC which composed the Dynamic String package was recompiled
- with a few changes.
-
- 1. The type "long-integer" is not available on DEC, therefore type "integer"
- was substituted and type "short_integer" was used in place of type
- "integer".
-
- 2. INTEGER_IO and FLOAT_IO were incorporated by using the predefined
- instantiations, FLOAT_TEXT_IO and INTEGER_TEXT_IO.
-
- 3. The private definition of DYN_STRING for a validated compiler was to
- allow the discriminant, the string size, to change frequently. In order
- to accomplish this, a default value was required initially and each
- change was then made with a complete record assignment. However, this
- definition raised a numeric error during elaboration. We tried this on
- VERDIX and raised the same error, VERDIX contends it is a 'bug'.
-
- We later tried the following definition and had no problem.
-
- subtype INDEX is positive range 1..100;
- type DYN_STRING (SIZE : INDEX := 1) is private;
-
- private
- type DYN_STRING (size : index := 1) is
- record
- DATA : string (1..size);
- end record;
-
- Note, this constrains the maximum allocation size of the string but
- still allows the string to be dynamic.
-
- The original method, to be used when a validated compiler was not
- available, worked fine.
-
-
-
- EXECUTION
- ---------
- We were able to execute a program that used the Dynamic String Package and
- it appeared to be in workable condition.
-
-