|
![]() |
General Information
Tutorials
Reference Manuals
Libraries
Translation Tasks
Tools
Administration
|
Tutorial on Type AnalysisMessages on Scope Rule ViolationsErroneous programs may violate the scope rules in one of two cases:
Such situations shall be indicated by error messages. Furthermore, we want every defining occurrence of a multiply defined identifier be marked by a message. For that purpose we use the following two library modules: CoreChk.specs[8]== $/Tech/Strings.specs $/Prop/OccCnt.gnrc:inst This macro is attached to a product file.
The
The
The check for existence of a definition is directly obtained from
the module role CoreChk.lido[9]==
SYMBOL UseIdent INHERITS ChkIdUse END;
SYMBOL TypeUseIdent INHERITS ChkIdUse END;
SYMBOL DefIdent INHERITS ChkUnique END;
SYMBOL ChkUnique INHERITS Count, TotalCnt COMPUTE
IF (GT (THIS.TotalCnt, 1),
message (ERROR,
CatStrInd ("identifier is multiply defined: ",
THIS.Sym),
0, COORDREF));
END;
This macro is attached to a product file.
|