ciao! Ecco un esempio (il comando listxtend è definito sopra):
`\listxtend
\begin{lstlisting}[label={cap1list2},caption={checks.chk}]
import data;(*@\label{cap1list2:import}@*)
context Attribute ERROR “Names must be more than one char long” : name.length > 1;
context Entity ERROR “Names must be more than one char long” : name.length > 1;
context Entity ERROR “Names of Entity attributes must be unique”:
attribute.forAll(a1| attribute.notExists(a2| a1 != a2 && a1.name == a2.name ) );(*@\label{cap1list2:vincolo3}@*)
\end{lstlisting}`
output:
`/ import data ; /
2
3 cont ext Attribute ERROR ” Names must be more than one char long ” : name . –
length > 1 ;
4
5 cont ext Entity ERROR ” Names must be more than one char long ” : name . length > –
1 ;
6
7 cont ext Entity ERROR ” Names of Entity attributes must be unique ” :
8 attribute . forAll ( a1 j attribute . notExists ( a2 j a1 != a2 && a1 . name == a2 . –
name ) ) ; /`
come puoi vedere ci sono degli / indesiderati in corrispondenza delle etichette…
grazie ancora! a presto!