HP SunSoft Pascal 4.0 Uživatelský manuál Strana 190

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 333
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 189
166 Pascal 4.0 Users Guide
8
Character Strings
There are some precautions to take with character strings regarding the null
byte, passing by value, and static storage:
Set the byte count to zero before calling Pascal with a null varying string,
because that is what Pascal assumes about such strings.
Pass a structure consisting of a 4-byte integer and an array of characters
from FORTRAN to a Pascal procedure, expecting a var parameter that is a
variable-length string.
Pass by reference by making the strings var, in, out, or in out
parameters.
Set the string to constant because FORTRAN and Pascal each guarantees the
null byte only if the string is a constant. Neither of them relies on the null
byte, which is not required by the ISO Pascal Standard.
Array Indexes
The Pascal and FORTRAN array indexes can start at any integer; be sure they
match.
Incompatibilities
There are several incompatibilities between Pascal and FORTRAN variant
records, enumerated types, and set types.
Variant Records
In general, Pascal variant records require adjustment of alignment to match
with FORTRAN unions and structures.
Enumerated Types
Pascal enumerated types have no comparable type in FORTRAN.
Zobrazit stránku 189
1 2 ... 185 186 187 188 189 190 191 192 193 194 195 ... 332 333

Komentáře k této Příručce

Žádné komentáře