, , , , ...

   , , ,   www.toehelp.ru
Cc
    / / 7. ,

7. POPAMMPOBAHE HA OCHOBE MOE, HACAHHX HA PAHX KAX.

. , S- S- S-. .



1. BBEEHE
2. MOE AMT
3. BOP COAEH O EPEAE APAMETPOB
   3.1. epeaa apaepo cco aee
   3.2. cooae epeeoo ca apaepo
4. COAEH O EHTKATOPAX
5. COAHE HTEPECOB HA OPTPAHE ACKA C
6. OPAEHE K POEPAM HA ACKAE C OPTPAHA
7. T AHHX
   7.1. cooae a aex o ax
   7.2. ae eoo a
   7.3. ec co ax
   7.4. ecee ca
   7.5. epeaa cpo
   7.6. aae
   7.7. Macc, SUPER acc HUGE acc
   7.8. ac cpp
   7.9.
8. COBMECTHOE OOBAHE AHHM
9. BBO BBO
10. COOEH O OKAX
11. BOMOHOCT OPTPAHA, OEPBAE CMEAHHOE POPAMMPOBAHE
   11.1. Oepaop INTERFACE
   11.2. Ap
   11.3. apeco
   11.4. Cpo C

1.BBEEHE.

cooae Ba p popapoa, oe acax a px ax ooe:
  1. cooa oe poep a px ax. Hapep, B oee a MC-C oe popa, acao a . Tae oo cooa oppae oe popa, acax a MC- MC-C.

    o ooac oeo a opeeeo e, B o aaa oep oe oopo oo a. Hapep, o ooac eoopo oppao oeo p paoe c popao, acao a C, B o aaa oep oe c oopo S-, ae a ca Ba oe.

    o eoxoo, a a popa, acae MC-, MC-C MC-, coepa opae co cooec pao oea.

  2. B oee cooa oooc, e peaoae Bae e.

    Hapep, coo aca poep ap a a , apo o eo a C . Tae, eoope c e oea ae a cppax a C a , e peaoa .

  3. Ec B coaee co cocee oe poep, B oee coppoa oe poep, coec co ce pe a.

B o aeo poa aepa o a, o ceo ca, p popapoa, o a pax ax.

2.MOE AMT.

Ec B oeec C-poepa, B o opoa Ba C-o co oe a LARGE. Copeee epc e peaa opa px oe a; o oo coec c oe C LARGE.

B o cooa oe C-oe LARGE. Heoope ooe C-oe ccac a oe px o. Ec B coee oe c po oe a, c oac eoppe.

3.BOP COAEH O EPEAE APAMETPOB.

, C , a , ee coe coceoe coaee o epea apaepo.

Bo-epx, oac opo , oopo apaep aocc ce. MC- MC- aoc apaep ce o e ope, a o oca aooe poep. MC-C aoc apaep opao ope.

oac ee o, axoc o, opee a a apaep cea oce opaa poep, ae poepe aeo poepe. B coae /, o axoc aeo poepe; C o o cee a opaee poepe.

B / epeaa apaepo coaco coae p x ax, ocecec ecoo cpee pee ee oa. Coaee C ooe Ba cooa epeeoe co apaepo (a a ep apaep cea oce aocc ce, o cea axoc aae cea aae aa apec aopa apaepo). coae ecoec. Haoe, oac cocoo epea apaepo: cco aee. Cope pae "epeaa apaepo c oo cc o ae".

Ec B aee, a a, a ae o, B oee pa aoe coaee cooa. Ec Ba o epeaa epeeoe co apaepo, coe coaee C (cope pae "cooae epeeoo ca apaepo"). Moe B axoe ooac coaee o epea apaepo o oa.

oo o opaac oo poo, B o aa oop, aoe coaee coec. B MC-C, MC- MC- cec cea, aae ae coae B coee, a oa ee poep, a oa pee poep. Taa 7-1 coep cea coae epea apaepo aoo a.

---------------------------------T---------------------------
|  oopoo opaac     | Ap/ee coa   |
|  poepe                    |                           |
+--------------------------------+---------------------------+
|  cooae coae C   |                           |
|                         | ap   aooe     |
|                                | ep                 |
|                         | ap C       |
|                                |  INTERFACE                |
|  C                            | o oa              |
|  cooae coae      |                           |
|                        |                           |
|                         | ap FORTRAN           |
|                                |  e poep     |
|                         | o oa              |
|  C                            | eoe coo    |
|                                |  aooe poep     |
|  cooae coae      |                           |
|                         |                           |
|                         | o oa              |
|                         | ap PASCAL            |
|                                |  e INTERFACE     |
|  C                            | eoe coo ACKA    |
|                                |  aooe poep     |
L--------------------------------+----------------------------
Taa 7-1  Cea coae epea apaepo.

3.1.epeaa apaepo cco aee.

Koa apaep epeaec cco, epeaec apec apaepa. poep oa ae apaepo epe apeca, e ee apaepa aeo poepe e e aecoo apaepa. Koa apaep epeaec aee, o apaepa aocc ce p oe poep. poepa oe e aee apaepa, o eo cooec aec apaep oce xoa poep ocaec, a e, a o opae e.

aoo apaepa B paee coco epea, aee, cco. Ec B epeaee cco, cece e oooc: epeaa apec (cee ceee) epeaa opo apec (oo ceee).

Ec aea poepa opaae eeoe aee aecoo apaepa, a pea, B coee epea cco. epeaa aee, aae po oooo ee ax, epeex, paepo ee 4 aa, oaaec oee eo.

oa aoo a:
  • ce apaep epeae cco (a oca pae), o oo aa epea aee. Ec poepe aa ap PASCAL C, coaee o oa eec: ce apaep o poepe epeaac aee o cee cea, ee coaee.
  • C cea epeae acc cco, a ce pe apaep aee. B C B oee epeaa aae, a apaep: poepa e o cae cooa aae p ee apeo e, e ca oe pea e a e a p epeae cco.
  • epeae apaep aee, o oe aaa epeaa cco.

Ec B oaac o pao o oa, B o aa opeeee ee coa, ap aaee. O o cooecoa coae, oopoe B coee. Cope a 7-2, 7-3 7-4.

Ec B epeaee apaep p coae C, coe op ocae ae 7-2, p oca apaepo.

--------------T----------------T---------------T------------
| APAMETP    |     C         |  ACKA      |  OPTPAH   |
+-------------+----------------+---------------+------------+
|      |aae a | Vars eoe | Referense  |
|    apec    |                | coo         | ap    |
| Kopo    |  near aae| Var eoe  | Referense, |
|    apec    |  a         | coo         | near       |
|             |                |               | ap   |
| aee    | o oa   | o oa  |o oa|
|             |                |               |            |
L-------------+----------------+---------------+-------------
Taa 7-2. apaep p coae C.

Hapep, peoo, o B coee coaee C. Taa 7-1 oaae, ae ap ee coa o cooa.

Koa opaaeec , ae C ap oca poep. Koa opaaeec ae C ap epe INTERFACE. Koa opaaeec C, C coaee aaaec o oa.

Teep, peoo ,o B xoe epea e apaep x, co apec. Coecoc o ax e ocaa e o ae, eep oo, o int C, integer , INTEGER ae. Taa 7-2 oaae, o oa Bae poepe a C oca apaep x, B o cooa aae ( o oa far) cooeceo a ( ao cae, int). Ocae apaepa x a C: int *x; Koa ocaee apaep x Bae poepe a , coe eoe coo VARS

               VARS X:INTEGER
poep a coe ap REFERENSE:
              INTEGER X[REFERENCE]
Ec B xoe epea apaep, co opo apec, cooece oca apaepa x, :
                   int near *x ;
                   VAR x:INTEGER ;
                   INTEGER [REFERENSE,NEAR]
coe e e p, ec B axoe ocooac p coae o epeae ax: ec B epeaee apaep co coaee , coe ocp, peee aax 7-3 7-4 p oca apaepo.
---------------T--------------T-----------------T--------------
| APAMETP     |    C        |          |       |
+--------------+--------------+-----------------+--------------+
|  apec|aae a  | eoe coo  |  ap     |
|              |           |     VARS        | REFERENCE    |
| opo     |near aae| eoe coo  | REFERENCE   |
|   apec      | a        |     VAR         |  NEAR        |
|              |              |                 |     ap |
| aee     | o oa | o oa    | o oa |
L--------------+--------------+-----------------+---------------
        Taa 7-3   apaep p coae .

---------------T--------------T-----------------T--------------
|  APAMETP    |     C       |          |       |
+--------------+--------------+-----------------+--------------+
|       |aae a  | eoe coo  | o oa |
|  apec       |           |    VARS         |              |
| opo     |near aae| VARS eoe   |  ap     |
|  apec       |    a     |   coo         | NEAR         |
| aee     | o oa | o oa    |  ap     |
|              |              |                 | VALUE        |
L--------------+--------------+-----------------+---------------
        Taa 7-4   apaep p coae .

Ec B e e ca oe poep: a ae, B o epeaa apaep, a o oca cece opeee poep. Ec B e eee oa pao c o, oopo B opaaeec, Bac o o ape opeee cocoa epea apaepa - aee cco. Cco, pee e, ooe Ba o paopac.

Cee apaepo epeac aee:
  • B , o eappoa apaep, poe VAR, CONST, VARS CONSTS apaepo.
  • B C, o eappoa apaep, a cee acco.
  • B , apaep, eappoa c apo VALUE.
  • B , apaep , PASCAL ( REFERENCE).
Cee apaepo epeac cco c opo (2-ao, oo ceee) apeco.
  • B apaep opaa oca a VAR CONST.
  • B , epeea epeaaea aaee a epee. aae ca epeaec aee. (He peoeec cooa aae a opao, a a cece eca c e aae a apeca)
  • B , epeea epeaaea epeae epeeo ADR. Apec ca o cee (a ce aae) epeaec aee.
  • B C, apaep epeac aaee near a apaep (aae epeaec aee).
  • B C, acc oca c e coo near.
  • B , poepax e apo C PASCAL, apaep e apa NEAR.
  • B , poepax e apo C PASCAL, apaep c apa NEAR REFERENSE.
  • B , epeea epeaaea opo apeco aece apaepa LOCNEAR; aee o ec INTEGER*2.
Cee apaepo epeac cco c (4-ao, cee ceee) apeco.
  • B , ADS epeea (apec epeaec aee)
  • B , apaep ocae e coa VARS CONSTS.
  • B C, apaep, epeaae epeae aae far a apaep (cca epeaec aee). ae, o LARGE oe C, far aae-o aaee o oa.
  • B C acc, e ocae e coo near.
  • B , o apaep -popa, a cee apaepo ocax apa NEAR VALUE.
  • B , epeea epeaaea apeco aece apaepa LOC LOCFAR; aee x ec INTEGER*4.

3.2.cooae epeeoo ca apaepo.

Ec B copaeec cooa epeeoe co apaepo:
  • co aecx apaepo oo ee pao c opax apaepo (ec aea poepa acaa a ).

    Ha oa cooc p paoe c apaepa, oope opao e opeee. Oao, B oee cooa ap VARYING epea ex eeo, oope oca.

  • B o cooa C VARYING ap Bae epe INTERFACE a , oca poepe a .

    Ap VARYING aa oop e poep oe ee aecx apaepo, e opax apaepo. Oao, aece apaep cooece opa apaepa poepc a coecoc o coaco o paa poep opae poepe.

4.COAEH O EHTKATOPAX.

Ec B ee ceoa paa pee e, oop MC-, MC-C, MC- oppeo coacoa ea.

  • Ec B coee poep a , a cex eaopo (e) oa e pea 6 ep.
  • eae ooac aa epa eaopax C. Ec B o oaeo cooa aae ep, ae IGNORECASE e coe pe eaop, ee o e acae, a aa cea C eaop (Hapep, ec eaop C AnEXAMPLE, e coe anexample, ANEXAMPLE AnExAmPLE a eaop).

Ec B ce-a e oee ceoa paa, B oee eoopx cax coacoa ea ca. Ocaa ac aoo paea ocea coae o eaopa o oa ao e, cooecx apo ex co a coae o oa.

Bo cex pex ax, ea acac pao paoe ae cxoo ae. Cece oe pex eeax coae o eaopax.

PAMEP
B , ce poce ep, peopac aae epe coae paoeo aa. o oa oo e pocxo c eaopa C, o oo aa, o o pe peapoa ce pocxoo oppoae paepa ep.
HA
B , o oa, ea o e oe ec ep.
OEPKBAHE
B C, epe ea cea cac oep epe a.

o pae coaex o eaopax po o, o acae co a o oa e cooece aca e C o oa. Cec ap ee coa, p oo oopx oo coacoa ea.

Ec B aa ap C e oe ee poep oea ax e poep, epeca, eoaoo COMMON-oa , o o peopaec pocoe c paee oepa aa e. eaop o pee opae 6 epa. o aa oee oe , o aa ee C poep, ee aae ep cox eaopax, B oee cooa ALIAS OPTPAHE. Boooc ALIAS, e ACKAE; ccac a oe C c aa epa eaope, oo aa ap IGNORECASE, p o ce Bae eaop a C o e paoe acae.

, . .

ae, o , ec INTERFACE opopaa a oop ccaec INTERFACE axoc oo oe o, o e e eaop apaepo o cooa a a. p ape oo paa e aa oa 87.

5.COAHE HTEPECOB HA OPTPAHE ACKA C

oca ex poep a C MC- eeo epee INTERFACE.

Hapep, peoo, o B xoe opac poepe time oe C. Tp aa coa epeca:

  1. Ha ocae poep a C
  2. Coa o INTERFACE.
    Opee ap poep
    Opee ap apaepo
  3. oa o INTERFACE popae.
oce a, opaee poepe a C, ocaec cee paee. pepa, paccop ocae C-poep time:
                            long time (tloc);
                            long *tloc
ep a coa INTERFACE o opee, ae ap cooa o poep. Caaa opee, ao ec aeo poep time. epoe coo oca C-poep, long time. Oaoc c paeo "ee: 4-a, co ao" ae 7-5, B aee, o aeo long C ec INTEGER*4. a o, oo aca:
       INTERFACE TO  INTEGER*4  FUNCTION TIME
Bo-opx, pe aoe coaee o epeae ax cooa. Ta a B e oee e C-poep, B o cooa poe e coaee. aa coae C, coe C ap:
      INTERFACE TO  INTEGER*4  FUNCTION TIME[C]
Teep, opee ap ax apaepo. B ao cae ceo o apaep, tloc.B oee aca:
       INTERFACE TO  INTEGER*4  FUNCTION TIME[C] (TLOC)
Oao, ae, o o opo cpoe oca poep C, epe tloc co eoa "*", aa o epeaec aae. B oee epeaa aae co cpoee LOCFAR LOC, B oee epeaa ca ape cco. peoo, Ba axoc epea apaep cco. B o oa apaep epeac cco, o poepa epe INTERFACE opeeea c apo C, oo TLOC e o oa epeaac ae. o aa epea cco ao oa REFERENCE ap:
      INTERFACE TO  INTEGER*4  FUNCTION TIME[C] (TLOC[REFERENCE])
T apaepa aa ep coo o opo cpoe oca poep C, long *tloc. Ta, a e c, o INTEGER*4 ae long C, oo aca:
      INTERFACE TO  INTEGER*4 FUNCTION TIME[C]
     *(TLOC[REFERENCE])
      INTEGER*4 TLOC
      END
peoo, B axoe epea aae a apaep, eco epea apaepa cco. aae epeaec aee, oo e ao aaa REFERENCE ap. Ta a aae e 4- aoe apeca peao LOC e 4-aooe eoe, B oee oca apaep TLOC, a 4-aooe eoe:
      INTERFACE TO  INTEGER*4 FUNCTION TIME[C] (TLOC)
      INTEGER*4 TLOC
      END
Tpe a, oaee o INTERFACE ocoo popae, oao oox cae. ooee o INTERFACE epe opae ocao e poepe ec ece opaee. Oo ce o INTERFACE cac aae oa o.

oce a, opaee poepe, oe cae REFERENCE aae. o paccapaec cee paee.

6.OPAEHE K POEPAM HA ACKAE C OPTPAHA.

Koa B oca poep, B oee a ee Bae popa, a e a poep acae a e ocoo popa. aee, o p opae , B o cea oca poep popax ox, e oeec. pepa ocaoo pee paee, aao ae poep oe e a:
      SUBROUTINE CLOCK
      INTEGER*4 TIME
      INTEGER*4 TLOC
He aae oca poep, a cpoe INTEGER*4 TIME. Ec B epeaee TLOC cco, B oee ao a o a:
      SUBROUTINE CLOCK
      INTEGER*4 TIME
      INTEGER*4 TLOC
      WRITE(*,*) TIME(TLOC)
      END
Ec B epeaee aae, Baa poepa e ao:
      SUBROUTINE CLOCK
      INTEGER*4 TIME
      INTEGER*4 TLOC
      WRITE(*,*) TIME(LOC(TLOC))
      END
B oee ae LOC a LOCFAR; aoo ca, x ec e.

ae, o ec time ac opopao eco , B o e opac c oo oepaopa CALL.

7. T AHHX

Ka , , C e ecoo o ax. Heoope x ooc coec; pe pe peopaoa p epexoe o ooo a po. B cex paeax ocac ax x oe pax ax. B aax 7-5 - 7-14 ocaa aeoc o ax.

7.1.cooae a aex o ax.

p epeae apaepo B o ooac aa 7-5 - 7-14 coeco c aa 7-2 - 7-4.

Hapep, B xoe epea epee a INTEGER*2 C.

Bo-epx B o pa coaee o epeae apaepo (Cope pae "Bop coae o epeae apaepo"). peoo, o B pa coaee C. B o cae coe a 7-2 "epeaa apaepo p coae C."

Bo-opx, pe epeaa apaep cco aee, co opo apec. Taa 7-2 oce, a cooa ap REFERENCE NEAR , aae near cooeceo a C.

B-pex, B o opee, ao ax C aee INTEGER*2 . Hae ae, ocae ee ca ( Taa 7-5) pae INTEGER*2. ae ae cooec pae C. B oee pa short int (o ooe "peae" aao, o int ac o oe BM). acao coecoc, pae short C. Haoe, pcoe ap ee coa ax oepaope INTERFACE ocao c apo C.

        INTEGER*2 X [REFERENCE, NEAR]
o aeo oca apaepa C:
       short near *x
ae, o cooae apaepa c REFERENCE cao c cooae a cca C.

7.2.ae eoo a.

B C, e ee apaep opoe e int (apep, a char) peopac int epe epeae aee. ee e aa ee e unsigned int (apep a unsigned char) peopac unsigned int.

Cec a cocoa apapoa paoc pao c apaepa eoo a p opae C:

  1. B oee a C-peopaoa, p oca apaepo poepe . Hapep, oo p oca cex ex apaepo aa x cooec C a int long int.
  2. B oee epeaa aae a apaep eco x ae (epeaxc cco). B popaax a , ocae epeaec apaep a aae cooeceo a, ae coe ee oceo epea ae.

ae, o C int ac o a a. ceeca 8086 popoecopo, int ec aeo cex o:

  • INTEGER2
  • INTEGER*2
  • INTEGERC
  • INTEGER[C]

oo poeccopa oepaoo cce, epeee c oce a ae epee C a int caoeoo ao cce (ocee a a oee epeoc, e epe a). Taa 7-5 ocae ae eoo a aee , C .

 --------------------------------------------------------------
 |                EE: 2 ATA, E HAKA                    |
 +-----------------T---------------------T---------------------+
 |             |      ax      |    peae       |
 +-----------------+---------------------+---------------------+
 |                 |      x:word         |                     |
 |                 +---------------------+---------------------+
 |          |  x:wrd(a)..wrd(b)   |      > 255      |
 |                 +---------------------+---------------------+
 |                 |  x:(a,b,...n)       |     ord(n) > 255 |
 +-----------------+---------------------+---------------------+
 |                 |  unsigned short x   |                     |
 |      C         +---------------------+---------------------+
 |                 |  unsigned int x     | ac o a     |
 |                 |                     |      a         |
 +-----------------+---------------------+---------------------+
 |                 |                     | oppa e ee  |
 |                 |                     | o "e aa",  |
 |                 |                     | o cooa |
 |                 |                     |  INTEGER*2.He    |
 |                 |                     | epeaae opa  |
 |          |     INTEGER*2 X     | ee ae |
 |                 |                     | ae oe e |
 |                 |                     | 32767.aee, o |
 |                 |                     | co ae a  |
 |                 |                     |  INTEGER*2, oo   |
 |                 |                     | poo oo   |
 |                 |                     | oepa, e e  |
 |                 |                     | aa.              |
 L-----------------+---------------------+----------------------

 --------------------------------------------------------------
 |              EE : 1 AT, CO HAKOM                      |
 +-----------------T---------------------T---------------------+
 |             |     ax       |    peae       |
 +-----------------+---------------------+---------------------+
 |                 |      x:sint         |                     |
 |          +---------------------+---------------------+
 |                 |    :a...b           |   a >= -127      |
 |                 |                     |                     |
 |                 |                     |   b <= 127       |
 +-----------------+---------------------+---------------------+
 |                 |      charx          |  p epeae       |
 |                 |                     |  cco            |
 |       C        +---------------------+---------------------+
 |                 |   struct {          |  p epeae       |
 |                 |   char x ;} x       |  aee          |
 +-----------------+---------------------+---------------------+
 |          |         e         |                     |
 L-----------------+---------------------+----------------------

 --------------------------------------------------------------
 |               EE ; 1 AT, E HAKA                     |
 +-----------------T---------------------T---------------------+
 |             |      ax      |    peae       |
 +-----------------+---------------------+---------------------+
 |                 |     x: byte         |                     |
 |                 +---------------------+---------------------+
 |                 |     x: wrd(a)...(b) |   0 < a < b      |
 |          |                     |   b < 255        |
 |                 +---------------------+---------------------+
 |                 |     x: (0, b...n)   |                  |
 |                 |                     |     ord (n)< 256    |
 +-----------------+---------------------+---------------------+
 |                 |  unsigned charx     | p epeae cco|
 |     C          +---------------------+---------------------+
 |                 |  struct {           |   p epeae      |
 |                 |  unsigned charx ;}  |      aee      |
 +-----------------+---------------------+---------------------+
 |                 |                     | B  e a |
 |                 |                     | "e aa",  o  |
 |                 |                     | e cooa   |
 |                 |                     | CHARACTER *1, co|
 |          |   CHARACTER*1 X     |   ICHAR  |
 |                 |                     | CHAR  peopaoa|
 |                 |                     |  ae.He epe|
 |                 |                     | aae opae  |
 |                 |                     | e ae.       |
 |                 |                     |                     |
 L-----------------+---------------------+----------------------
 --------------------------------------------------------------
 |              EE : 2 ATA CO HAKOM                      |
 +------------------T---------------------T--------------------+
 |              |       ax     |  peae        |
 +------------------+---------------------+--------------------+
 |                  |    x:integer2       |                    |
 |                  +---------------------+--------------------+
 |                  |    x:inegerc        |                    |
 |           +---------------------+--------------------+
 |                  |                     |    ec            |
 |                  |    x: integer       |   $integer:2       |
 |                  |                     |  (o oa)    |
 +------------------+---------------------+--------------------+
 |        C        |    short x          |   ac o a  |
 |                  |    int x            |   a           |
 +------------------+---------------------+--------------------+
 |                  |  INTEGER*2 X        |                    |
 |                  +---------------------+--------------------+
 |           |  INTEGER[C] X       |                    |
 |                  +---------------------+--------------------+
 |                  |  INTEGER X          | ec $STORAGE:2    |
 L------------------+---------------------+---------------------

 --------------------------------------------------------------
 |                EE : 4 ATA, CO HAKOM                   |
 +-------------------T--------------------T--------------------+
 |               |    ax       |   peae       |
 +-------------------+--------------------+--------------------+
 |                   |  x:integer4        |                    |
 |            +--------------------+--------------------+
 |                   |  x:integer         |  ec $integer:4   |
 +-------------------+--------------------+--------------------+
 |       C          |     long x         |                    |
 +-------------------+--------------------+--------------------+
 |                   |    INTEGER*4 X     |                    |
 |                   +--------------------+--------------------+
 |            |                    | ec               |
 |                   |   INTEGER X        |    $STORAGE:4      |
 |                   |                    | (o oa)     |
 L-------------------+--------------------+---------------------

 TAA 7-5 : aee  ax.
B C ae cece ee: 4-aa, e aa, aoo a e. Oao, oo apeecx oepa, e ax a, o poee a epee co ao c oee paoo peaa. oo oe ocaoo epea apaepo eoopx cax.

7.3.ec co ax.

, aee eco epeeo "1" oaae co, "0" oaae o. B ae 7-6 ocao, aee ece coe , C .
---------------------------------------------------------------
|                  EBCK T.                              |
+----------------T-----------------------T---------------------+
|            |    ax          |    peae       |
+----------------+-----------------------+---------------------+
|         |    x: boolean         |                     |
+----------------+-----------------------+---------------------+
|      C        |    unsigned char x    |                     |
+----------------+-----------------------+---------------------+
|                |                       | coc, a   |
|                |                       | ee: o a,   |
|                |                       | e aa; 1- o, |
|         |   CHARACTER*1 X       | 0- co          |
|                |                       |                     |
|                |                       | T         |
|                |                       | LOGIGAL e ee    |
|                |                       | aeo.       |
|                |                       | cope a    |
|                |                       |            7-14.    |
L----------------+-----------------------+----------------------
---------------------------------------------------------------
|                   CMBOH T                             |
+----------------T-----------------------T---------------------+
|            |     ax         |   peae        |
+----------------+-----------------------+---------------------+
|         |      x:char           |                     |
+----------------+-----------------------+---------------------+
|     C         |   unsigned char x     |                     |
+----------------+-----------------------+---------------------+
|         |   CHARACTER X         |                     |
L----------------+-----------------------+----------------------

Taa 7-6. aee  ax ece  Coe.

7.4.ecee ca.

C epeae ce ecee apaep aee e oo ooc. o epeaa apaepo c C a oppea, ec p oooc:
  1. B oee pecope C - peopaoa p oca apaepo poepax a . B o oca ce apaep c aae oo, a apaep c oo ooc (REAL*8 , real8 ) aa cea ap VALUE .
  2. B oee epeaa aae a apaep eco cax ae. B popae a , oe epeaaee apaep, a aae a cooec , ae aeo poepe o aae axoe eee apaepa.
  3. Ec B po oee e c aae oo o, B oee epeaa e a cpp. ee cpp e oepac ee a, p epea cpp a apaepa. Hapep, ocae:
               struct fptupe [float a;] arg;
    peee cpp epee arg, c o eeo a aae o. Cppa epeea arg oe ae epeaa a apaep. epeaa ao struct, a apaepa C aea epeae REAL*4 (oe o, o pocxo epeaa cco), ee real4 .

Be c aae oo epeac C a cpppoae e.

Taa 7-7 ocae aee ecee , C .

----------------------------------------------------------------
|        ECTBTEHE CA OHO TOHOCT                  |
+----------------T----------------------T-----------------------+
|            |    ax         |    peae         |
+----------------+----------------------+-----------------------+
|                |                      |  ec $real:4         |
|                |   x:real4            |  (o oa)       |
|         |                      |                       |
|                +----------------------+-----------------------+
|                |   x:real             |                       |
+----------------+----------------------+-----------------------+
|                |   float x            |                       |
|       C       +----------------------+-----------------------+
|                |   struct {           |  p epeae         |
|                |   float x ; } x      |  aee            |
+----------------+----------------------+-----------------------+
|           ECTBTEHE CA BOHO TOHOCT               |
+----------------T----------------------T-----------------------+
|            |     ax        |   peae          |
+----------------+----------------------+-----------------------+
|                |    x : real8         |                       |
|         +----------------------+-----------------------+
|                |    x : real          |   ec $real:8        |
+----------------+----------------------+-----------------------+
|      C        |    double x          |                       |
+----------------+----------------------+-----------------------+
|         |    REAL*8 X       |                       |
|                |  DOUBLE PRECISION X  |                       |
L----------------+----------------------+------------------------
 Taa 7-7 : aee  ax.

7.5.epeaa cpo.

, C o pao aoc cpo ep a. p epeae cpo ooo a po, o aa a pocxo ee opaoa.

C - cpo c acca ep. epa co (co aee o) oeae oe cpo ec ocee epo acca. pepa cpoa:

                String of text
a C a:
           unsigned char str []="String of text."
Oa aocc a, a acc 16-ao; 15-ao aaeo eca ( .e. caa cpoa) 1 epa co, oeaa oe cpo:
                   --T-T-T-T-T-T-T-T--T-T-T-T-T-T--
                   |S|T|R|I|N|G| |O|F |T|E|X|T|.|\0|
                   L-+-+-+-+-+-+-+-+--+-+-+-+-+-+---
Cpoa a e ee opaee p paee a. a cpo opeeec apaee. Cpoa a :
                    str = " string of text "
Oa aocc a eco 15 ao.
                   --T-T-T-T-T-T-T-T--T-T-T-T-T-
                   |S|T|R|I|N|G| |O|F |T|E|X|T|.|
                   L-+-+-+-+-+-+-+-+--+-+-+-+-+--
B cece a a cpo: cpoa a cpoao STRING aaoa cpoe , cpoa epeeo LSTRING. co LSTRING, pea cpoa aec a:
                  VAR STR; LSTRING (15),
                  STR :=" STRING of text.";
Oa aocc a, a ec 16 ao. ep a aae co ao oox a a cpo; ocaec 15 ao aae ca ec.
                 ---T-T--T--T-T-T-T-T--T--T-T-T-T-T-
                 | 1|5| S| T|R|I|N|G| O|F |T|E|X|T|.|
                 L--+-+--+--+-+-+-+-+--+--+-+-+-+-+--
B ae 7-8 oca cpo acco cex pex o.
------------------T-----------------------T---------------------
|             |     ax         |    peae       |
+-----------------+-----------------------+---------------------+
|                 |   C: STRING (a)       |                     |
|                 +-----------------------+                     |
|          |   C: ARRAY [1..a] OF  |                     |
|                 |       CHAR;           |                     |
|                 +-----------------------+                     |
|                 |   C: LSTRING (a-1);   |                     |
+-----------------+-----------------------+---------------------+
|                 |   CHARACTER*a C       |                     |
|          +-----------------------+                     |
|                 |   CHARACTER*1 C[a]    |                     |
+-----------------+-----------------------+---------------------+
|                 |   unsingned char c[a] |                     |
|      C         +-----------------------+                     |
|                 | struct cstr {unsigned |                     |
|                 |  char c [a]; } c      |                     |
L-----------------+-----------------------+----------------------
Taa 7-8 T cpo  acco.
B ae 7-9 oca aee cpo.
---------------T----------------------T---------------------
|          |     ax        |   peae        |
+--------------+----------------------+---------------------+
|       | x: array[1..n]of char|                     |
+--------------+----------------------+---------------------+
|     C       | char x[n];           |                     |
+--------------+----------------------+---------------------+
|              |                      | He ee ae,|
|              |                      |  x epcx   |
|              |                      | .He peoe |
|              |   CHARACTER *h x     | oa.Moe coo|
|       |   INTEGER X ((h+1)12)| ac a epee  |
|              |                      | e a CHARACTER  |
|              |                      |  oepa a o |
|              |                      | e aa.|
|              |                      | oooc e   |
|              |                      | paa  x   |
|              |                      | epcx.            |
L--------------+----------------------+----------------------

B cex paeax ocaec epeaa cpo ooo a po.

epeaa cpo C .

Cpo a ae pacoaac a a cpo a B oee epeaa po.

epea cpo a C, coe oooc C cpo. Koa caapa cpoa ocaa cee a epo C, a cpoa e eppepoaa a cpoa ocaa a C. epa co aoaec oaec o cpo opa ce (\) opaaaec a escape. He o ae e ooc ocaa oooc cpo C.

epeaa cpo C .

Cpo a oaoo pacoaac a, oo epeaa x p (e peopa).

epea a STRING C, coe oepa oaea (c), pa eo a o cpo. Hapep, ec "strg" ec epeeo a STRING oepa oaea e e a:

                  strg: "STRING of text."*CHR(0);

aee "strg" oe cooaa o e C aece apea.

epea cpo a LStrings C , B o peopaoa x STRINGS oa .

epeaa cpo C .

B , C - cpo o pecae oo e acco. p epeae cpo C , ooe eco eoo aa oe cpo.

7.6.aae.

B ae 7-10 ocac aee aaee aoo a. p cooa aaee poep oa opopa a C C, p coae C o epeae ax, coe pee e cacec op oca cca apeo ae C poepe.
                   returntype (*x) (types-list)
ec returntype cooece pea, types-list ocac ae a cco apeo poep p oe x a C. p cooa coae , coe cacec op:
                   returntype (pascal *x) (types-list)
A p cooa coae opa e ao:
                   returntype (fortran *x) (types-list)
Hapep, B oe epea ADSPROC a popa a C:
                   f(x)
                   short (paskal *x) (short);
B o pepe, x cca a poep ACKA , c aec apeo a short, aee aoo e a.
-------------------------------------------------------------
|                KAATE NEAR                              |
+--------------T---------------------T-----------------------+
|          |    ax        |    peae         |
+--------------+---------------------+-----------------------+
|              |       x:^t          | ac o a a|
|       +---------------------+-----------------------+
|              |     ADR t           |                       |
+--------------+---------------------+-----------------------+
|     C       |    t near *x        |                       |
+--------------+---------------------+-----------------------+
|              |      TOBJECT        |                       |
|       |      INTEGER*2 X    |                       |
|              |  X = LOCNEAR(OBJECT)|                       |
L--------------+---------------------+------------------------

--------------------------------------------------------------
|               KAATE FAR                                 |
+---------------T----------------------T----------------------+
|           |    ax         |     peae       |
+---------------+----------------------+----------------------+
|        |       ADS t          |                      |
+---------------+----------------------+----------------------+
|               |       t *x           |                      |
|      C       +----------------------+----------------------+
|               |       t far *x       |                      |
+---------------+----------------------+----------------------+
|               |       TOBJECT        |                      |
|               |       INTEGER*4 X    |                      |
|               |       X = LOC(OBJECT)|                      |
|        +----------------------+----------------------+
|               |   TOBJECT            |                      |
|               |   INTEGER*4 X        |                      |
|               |   X=LOCFAR(OBJECT)   |                      |
L---------------+----------------------+-----------------------

--------------------------------------------------------------
|            KAATE HA POEP                           |
+---------------T----------------------T----------------------+
|           |     ax        |    peae        |
+---------------+----------------------+----------------------+
|               |     x: adsproc       |  B o oca   |
|               |                      |  pe poep|
|               +----------------------+  o ADS oepaop  |
|        |                      |  o opaoa far  |
|               |     x: adsfunc       |  apec.Koop c-|
|               |                      |  aaae near    |
|               |                      |  apeca  oax|
|               |                      |  poep            |
+---------------+----------------------+----------------------+
|     C        |       t (*) ()       |                      |
L---------------+----------------------+-----------------------

--------------------------------------------------------------
|            KAATE HA POEP                           |
+---------------T----------------------T----------------------+
|           |     ax        |    peae        |
+---------------+----------------------+----------------------+
|               |   TPROC              |  EXTERNAL coe |
|               |   EXTERNAL PROC      |  c, oa   po- |
|               |   INTEGER*4 X        |  ep, coec|
|               |   X=LOC(PROC)        |  p oe          |
|               |                      |   ( o p-|
|        +----------------------+  epe epec apec  |
|               |                      |  poep).ae    |
|               |   TPROC              |   coae o  |
|               |   EXTERNAL PROC      |   epee     |
|               |   INTEGER*4 X        |  oe apec o  |
|               |   X=LOCFAR(PROC)     |  epeeo, a e    |
|               |                      |  poep.          |
L---------------+----------------------+-----------------------
Taa 7-10 aee  ax: aae.

7.7.Macc, SUPER acc HUGE acc.

Macc a pacooe o coa. Hapep, A(2,1) cee a A(3,1). Macc C paccooe o cpoa. Hapep, A(2,1) cee a A(2,2).

Haaec paa eco acce C cea c 0, ceo 1, a aee pa e opae.

Hapep, ec B opeee acc a C x[6] [3], ae acco a e X(3,6), a e x:array[0...5, 0...2]. Ec B pa ee x[5,0] , ee x[5] [0] C, ae ee e X(1,6).

, ec B opeee acc a , a:

                x:array [2..6, 2..3] of integer 2
ae e
                 INTEGER*2 x(2, 5)
ae C e
                short x[5] [2]

oe acc (acc ocae c apo HUGE eaoao $LARGE) e o ac C. B C, acc cea epeac cco.Ea B opaaeec , coee C ap, acc epeac aee, aaoo C struct. p o xoo acc axoc e cea. o epeaa acc a acc ( C), Ba pec cooa ap REFERENCE epea pea LOC, LOCNEAR LOCFAR (cope pae " apeco" aee o ae)

B ae 7-11 oca aee acco , C .

----------------------------------------------------------------
|           MACCB: HH PAHA MACCBA ACKA PABHA 0     |
+------------------T---------------------T----------------------+
|              |     ax       |    peae        |
+------------------+---------------------+----------------------+
|           |   x:array[0..j,0..m]|                      |
|                  |        of type      |                      |
+------------------+---------------------+----------------------+
|                  |    type x[j+1] [m+1]|  p epeae        |
|                  |                     |      cco         |
|       C         +---------------------+----------------------+
|                  |    struct{          |  p epeae        |
|                  | type x[j+1] [m+1];}x|      aee       |
+------------------+---------------------+----------------------+
|           |    type x(m+1,j+1)  |                      |
L------------------+---------------------+-----------------------
----------------------------------------------------------------
|           MACCB: HH PAHA MACCBA ACKA HE PABHA 0  |
+------------------T---------------------T----------------------+
|              |      ax      |     peae       |
+------------------+---------------------+----------------------+
|                  | x: array[i..j,k..of |                      |
|           |        type         |                      |
+------------------+---------------------+----------------------+
|                  |type x[j-I+1] [m-k+1]|  p epeae        |
|                  |                     |      cco         |
|        C        +---------------------+----------------------+
|                  |    struct { type    |  p epeae        |
|                  |x[j-I+1] [m-k+1];}x  |      aee       |
+------------------+---------------------+----------------------+
|           | type x(m-k+1,j-1+1) |                      |
L------------------+---------------------+-----------------------
 Taa 7-11. aee  ax: acc.

Cco super acca ec cca near a aao acca. Oa cee a epxe pae ( o e ope, a p oca acca). B ae 7-12 oaao a coa cea aae super acca:

----------------------------------------------------------------
|                     KAATE SUPER MACCBOB                  |
+-------------------T---------------------T---------------------+
|               |      ax      |   peae        |
+-------------------+---------------------+---------------------+
|                   |  type v=super array |                     |
|            |  [0..*,0..*] of type|                     |
|                   |       x: ^V         |                     |
+-------------------+---------------------+---------------------+
|                   |                     |  caoeo a pa |
|                   |  struct{type        |  oe (pae ep   |
|        C         |  near *ptr;         |  o paepoc)   |
|                   |  short a;           |  caoeo b pa |
|                   |  short b;}x:        |  oe (pae o   |
|                   |                     |  po paepoc)   |
+-------------------+---------------------+---------------------+
|            |         e         |                     |
L-------------------+---------------------+----------------------
 Taa 7-12. aee  ax: aae super acco.

7.8.ac cpp.

T ace , cpp C, eco ca e coo. epeaa epeex ace oee coa. Moo oca oeoe oe, a ee cpp, ae coa oa cex epeex ace.

B B oee coa oo ac co EQUIVALENSE, o e cece cocoa pepoa a ac epea aece apaepa. Ec ac cppa coep oo o oaooo paepa, B oee cooa cooec acc. B poo cae a o coa "p aeoc", o epeee ca a, o cooecoa eea cpp. Ec c cppa ee e 127 ao, B oee cooa coec epee ee pecae. o oxo ae e o, a ae co co popa. Peoec,p cooa C, coaa, e ooo, epece poep. Hapep, epeoa cpp epeee cap, c oop oe oeppoa .

aee, o B e oee epeaa set .

--------------------------------------------------------------
|           KOMEKCHE CA C OHO TOHOCT              |
+--------------------T---------------------T------------------+
|                |    ax        |  peae      |
+--------------------+---------------------+------------------+
|                    |    x: recod         |                  |
|             |    re, im: real;    |                  |
|                    |    end;             |                  |
+--------------------+---------------------+------------------+
|      C            |   struct complex8{  |                  |
|                    |   float re,im;}x    |                  |
+--------------------+---------------------+------------------+
|             |   COMPLEX X         |                  |
L--------------------+---------------------+-------------------
----------------------------------------------------------------
|           KOMEKCHE CA C BOHO TOHOCT               |
+--------------------T-----------------------T------------------+
|                |      ax        |   peae     |
+--------------------+-----------------------+------------------+
|                    |   x: record           |                  |
|     ACKA        |   re,cm:real8;        |                  |
|                    |   end                 |                  |
+--------------------+-----------------------+------------------+
|       C           |   struct complex16{   |                  |
|                    |   float re,im;} x     |                  |
+--------------------+-----------------------+------------------+
|             |   COMPLEX*16 X        |                  |
L--------------------+-----------------------+-------------------
 Taa 7-13. aee  ax, oece ca.

ac cpp C o ae cooa epea oecx ae . oecx ae , eoe "1" a co, o "0" a o. Taa 7-14 oaae pep epea oecx ae .

----------------------------------------------------------------
|             OECKE HAEH: BA ATA                    |
+--------------------T-----------------------T------------------+
|                |      ax        |  peae      |
+--------------------+-----------------------+------------------+
|                    |  x: record            |                  |
|             |  logical: boolean;    |                  |
|                    |pad:array[0..]of byte; |                  |
|                    |  end                  |                  |
+--------------------+-----------------------+------------------+
|                    |  struct {             |                  |
|      C            |    char logical;      |                  |
|                    |  char pad[1]; } x;    |                  |
+--------------------+-----------------------+------------------+
|             |   LOGICAL*2 X         |                  |
|                    |  LOGICAL              |  ec $STORAGE   |
L--------------------+-----------------------+-------------------
----------------------------------------------------------------
|               OECKE HAEH: 4 - ATA                  |
+--------------------T-----------------------T------------------+
|                |      ax        |  peae      |
+--------------------+-----------------------+------------------+
|                    |    x: record          |                  |
|             | logical: boolean;     |                  |
|                    | pad;array[0..2]of byte|                  |
|                    | end;                  |                  |
+--------------------+-----------------------+------------------+
|                    |    strucf {           |                  |
|       C           |   char logical;       |                  |
|                    |   char pad[3]         |                  |
|                    |   } x;                |                  |
+--------------------+-----------------------+------------------+
|             |     LOGICAL*4 X       |                  |
L--------------------+-----------------------+-------------------
 Taa 7-14. aee  ax, oece ae.

7.9. .

apaep-ea poep a coec, oao o e coec c apaepa ea poep a C. apaep-ea poep o pecae C cppo, oopa pe oceoaeoc /.

Ec B aee C , peoeec cooa aae poep C. Ec B xoe epeaa poep aece opaoo apaepa poep , B o cooa ape , a a , e ac epe aae poep. coe Ta 7-10 p paoe c aae poep.

Bopa ae.

popa a o opaa ae popa a C. o C popa opaaa opaaee e pao, popac oe papac cx e a ax pax ax. Koop C poo peopaoa opaaex e o epea pae a poepa. ee e, oope ee e int pacpc o paepa int, ae c aae oo peopac e c oo ooc. oca paeax "ee" "ecee ca".

Koop C poepe cpppee opaaee ae 4 aa ee opaae x a ee cooeceo paepa.

8.COBMECTHOE OOBAHE AHHM.

C o ccac a oe ae p pa p aa cooecx apo cooa pax co- ae o eaopax ex coax (Bce caece epeee o oca c e coo "near" C.) COMMON-o c oeoc o ax. O coec c e epee oea ax C, epee ae , apep. Oao, oo o oo o opac COMMON-o , o COMMON-o oe e ap NEAR. Heoee COMMON ee oee CMMQQ. e oe opaac oea ax C. Ho B oee cooa poep LOC , a apec COMMON- oa, epea apec C poep , ae cooa o apec C . Hapep:
            INTERFACE TO SUBROUTINE CFUNC[C] (EXTR)
            INTEGER * EXTR
            END
            COMMON/EXT/ I,Y
            CALL CFUNC (LOCI))
            .   .   .   .   .
            END
            void cfunc (ext)
            struct {lony i, j;}* ext
            {  ext - >i = ext->j;

9.BBO BBO.

a oe op oo ooo a oopeeo. cee ec caap aa oa opa a epa. o popa a C o aa opa a epa cpa oce aoo oepaopa WRITE, coeoc oa a epa oe ceoa oepaop: WRITE(*,*), , . ec o coec oe coo pae apeo.

10.COOEH O OKAX.

O aee o pe o, ac oopo oo a oopo oapea oa, oco cooe o oax cea aa a o, oopo pooa oa. Oao o a ea c aae oo o a o, coc popae. cooe o x oax e oac p o pa. B C cooe e e oepo.

11.BOMOHOCT OPTPAHA, OEPBAE CMEAHHOE POPAMMPOBAHE.

He epecee oooc MC- oo ca popa, cocoe oe MC-, MC- MC-C.
epaop INTERFACE
ooe paoa c poepa aca a px ax.
p
aa xapaepc opopa e- peex. Cece 9 apo: ALIAS, PASCAL, C, NEAR, FAR, HUGE, REFERENCE, VALUE VARYING .
apeco
Bopaa apec apea.
C cpo
a cea coo, ax a backspaces newlines c oo cooa oceoaeoce escape C.

11.1.Oepaop INTERFACE.

Oepaop INTERFACE coec oca poep acax a px ax aa coae cooecx a. ooe ocae oo oepaopa axoc ae 3 "Oepaop".

11.2.Ap.

Apa aaec ooea opa o epeeo, a epeeo, opopae, o apee opopa. O o cooa oca opopa, oce oca a, oepaopax INTERFACE. Ap c oce oea, a oop o ccac.

C:
------------------------------------------------------------
           [ap [, ap] ]
------------------------------------------------------------

 ALIAS

     o ap aae eee  opopa, ooe o
e aaoo  oca.
-------------------------------------------------------------
           ALIAS : 
-------------------------------------------------------------
   e:
     cpoa ocaa OPTPAHA. B o opaac  o-
          popae o e, aao  oca  peeax
          o o, ap alias ooe ccac a
          opopa  poo o  o.

Tae, B oee cooa ALIAS oepaope INTERFACE; epeopee opopa po oe o, oope Ba o a. Hapep, a A coep:

             INTERFACE TO SUBROUTINE F1[ALIAS:"F&&*-PPP"]
             END

             INTERFACE TO SUBROUTINE F2[ALIAS: "FFFFFFF2"]
             END
             SUBROUTINE G1 [ALIAS: "VERY LONG NAME"]
             CALL F1
             CALL F2
             END
             SUBROUTINE
             END
a B coep:
             INTERFACE TO SUBROUTINE F1 [ALIAS: "F&&-PPP"]
             END
             INTERFACE TO SUBROUTINE K1 [ALIAS: "VERY LONC NAME"]
             END
             SUBROUTINE F2 [ALIAS: "FFFFFFF2"]
             END
             SUBROUTINE F1
             CALL F1
             CALL K1
             CALL F2
             END
ec opopaa F1 A cac c F1 ae B, opopaa F2 ae A caec c F2 ae B, opopaa G1 ae A caec c K1 ae B.

o co coc cpoe , oe cooa string. Co string e pocxo ax peopaoa. Hapep, poce e peopac aae. o oeo p paoe c a, ac o paepa , apep C.

PASCAL

PASCAL oe cooac oo, a ap opopa. Ap aae, o opopaa ee xapaepc, cooece . Bce ape epeac aee (ec oo e apa REFERENCE), coec coaee o epeae apaepo /.

C

C coec cea opopa o ax. p cea opopa, C aae a o, o opopae aaeo coaee o epeae apaepo C. Ape opopa c coaee C epeac aee (ec oo e apa REFERENCE). (ae, o VARYING oe cooao oo opopaax c apo C). ea c cooec c coaee o eaopax C. Bee ea peopac poce aac c oepa( ). Ec B xoe cooa aae , coe ap ALIAS.

Koa ap C aa a INTEGER, o caoc C-integer. Paep, o oa, ex C oe , , e oao. o ac o oe coeoo Ba poeccopa. Hapep, c popoeccopo 8086, MC- coe 32-oe ee o oa, a C 16-oe ee. p popoecope 68000, oa a co 32-oe ee. oo, oa B e a popa opeeeoo poecopa, B oee cooa C ap ex epeex, epeoc o, o p epeae ex ce e C ox ax x oao paep.

VARYING

coec ece c apo C. aae o co aecx apaepo oe oac o ca opax. aece apaep cooece opa o e , oope cooec a opax apaepo. aece apaep, oopx e opax, o epeaac aee, e ee a (ae, o opopaa acaa a oe opaac oo opa apaepa, oope opeee, oo opo ca e pacapaec).

Koa B e poep a e co ap VARYING, o oaoc o o, o Ba o e coaa cc a apaep, oope e epeac p opae, ae B oee o eopeee pea. o a, o B o aa opopae, ae apaep epeac (apep, oca oo apeo ce pe). ae, p opae / e oe epeeoo ca apaepo, ap VARYING e ece, ec B e aa ap C opopa VALUE.

VALUE

VALUE aae, o aec apaep epeaec ae- e. p o, apaep c apo VALUE ocaec ee oce opaa opopa. Ec ap C PASCAL aa oca opopa, ce apaep o oa epeac aee. ocpo, acc c epee paepo, e o epeaac aee. B C acc oa e epeac aee. Ec B ae ap C p oca Bae opopa oa ee apaep acc, acc e epeaac, a cppa ax C(struct). o epea acc, o, o pacapac a acc (eco cpp), B eee e oooc:

  • aa ap REFERENCE opaoo apaepa.
  • epea pea LOC, LOCNEAR LOCFAR aee.

REFERENCE

REFERENCE aae o ape epeaec cco. ae, o ec B aee ece c apo REFERENCE ap NEAR, pea e cooecoa apaep VARS, a e VAR.

NEAR

NEAR aae a o, o aec apaep axoc ceee ax o oa oo ceee epeaec p opae e. p epea apaep VAR , oaeo ae ap REFERENCE NEAR.

o ap oo ae aa p oca COMMON-oo. NEAR COMMON o aocc cee ax o oa. x cacc:

-------------------------------------------------------------
            COMMON [/[[NEAR]]/]...
-------------------------------------------------------------
e:
   -  common-oa. Heoee common-o aoaec
     aocc  cee ax o oa. B oee aa
     NEAR  o oepaope COMMON opopa. Oao, p o
     ap NEAR oe  oaeo aa  epo oepaope
     COMMON oa o.

-, NEAR common- . B oee ca opopa aao Baeo cxooo aa, oca e common-o popa, a NEAR.

peeco aece COMMON-oo cee ax o oa ec aae oo cee p aa apeco. p o eeppec o, aa ee eca, oee e. Ec B e aa ap NEAR, Ba pec cooa apec, coco ceea cee p cce a a COMMON.

Ec COMMON-o oca a NEAR oo oe o, a po e, o COMMON-o oeaec cee ax o oa. B oe oopo o caec NEAR p cce a eo cooa opoe apeca, a px oax cooa e apeca.

Xo pao e peoeec, a opao oo oc coecoc c oea oopoa p epc 3.2 oopa.

aece apaep, oope epeac apaep c apo NEAR o axoc ceee ax o oa. B e eee epea cee apaep apaep NEAR:

  • ae COMMON-oax e apa NEAR.
  • HUGE acc.
  • Macc opeeee $LARGE eaoao.
  • epeee ocae $LARGE eaoae.

FAR

FAR aae a o, o ape epeaec c cooae oo apeca (apeca coepaeo cee)

HUGE

aae a o, o aec apaep oe aa oee e o cee. HUGE peocae oee oooc pao c acca, e eaoaa $LARGE, Hapep:

               FUNCTION F(A[HUGE])
               DIMENSION A(200)
               aeo:
               $LARGE :A
               FUNCTION F(A)
               DIMENSION A(200)

Koop e apape, o HUGE aae cex apeo aax oe e o cee. Copeee epc - C e co HUGE apaepo.

pep cooa apo.
  1.    INTEGER X[VALUE]
  2.    INTEGER X[REFERENCE, NEAR]
  3.    SUBROUTINE F[ALIAS,"other Name For F"]
  4.    INTERFACE TO INTEGER [C] FUNCTION F[PASCAL] (I,J,K)
       integer [c] i,j,k
       END

B pepe 1, ea epeea X epeaec aee.

B pepe 2, ea epeea X epeaec cco c cooae opooo apeca.

B pepe 3, opopaa F ee other Name For F a peea o o.

B pepe 4, F-ec e , c apea I,J,K, oca, a ee C.

11.3. apeco.

B o epc ee cpoee , oopx apeo ec epeea, a aee ee apec:
  LOCNEAR aee ec co a INTEGER*2, pecaee coo, eceepoa apec.
  LOCFAR aee ec co a INTEGER*4 pecaee coo ceepoa apec.
  LOC B o epc, ae LOCFAR.

B x x aece aecoo apaepa paec oe cooa o ape. Hapep, ec B coee pae, opae , oca, epeea epeaec aee, cooeceo apec o epeeo caoc aee . Ec B epeaee opopa aece aecoo apaepa LOCFAR, aee e apec aaa opopa.

Bea ac aee LOCNEAR cooece aae near C ADR . ooo o, ea ac aee LOCEFAR aea aae far aae a poep C, a ADR, ADSFUNC, ADSPROC .

LOCNEAR oe oo cooa p paoe c oea, aece eoee cee ax (apep, c eea NEAR COMMON-oo oea e ocax c oo $LARGE ea- oa).

11.4.Cpo C.

Cpoe e C aaac epo CTO (CHAR(O)) o coepa ceae co (ae a oa cpoa backspace). ep cepc opa ce(\) aece escape. cooae caapx oooce p oca ax cpo po oe. MC- epc 3.30 coe pacpe cpo oca; opa c paca- paec a escape. B ae 7-15 oca eo escape pape- ee o epc.

----------------------------T----------------------------------
|     EOKA escape        |           CMBO                 |
+---------------------------+----------------------------------+
|           \n              |    oa cpoa                  |
|           \t              |    opoaa a      |
|           \v              |    epaa a        |
|           \b              |    backspace                     |
|           \r              |    opa ape               |
|           \f              |    oaa cpo                 |
|           \\              |    opa ce                 |
|           \ddd            |    o o                    |
L---------------------------+-----------------------------------
Taa 7-15. Cpoe eo escape

\ddd ooe ep oa ACSII pa ocepo oe. Hapep, \O ee o 0. Ec cpoa coep oceoaeoc, e o e (apep \x \z), opa ce oppec. epa CTO aoaec oaec o cpo. Ocaa ac cpo oe cpoo (c.a 2). Cpoa "\abcd"C, apep, cooece cpoe "\abcd".