Type
Commande de compilation
javac -g -classpath ${UPS_HOME}/upsjav/upsvtm.jar type.java
Commande d'exécution
java -classpath ${UPS_HOME}/upsjav/upsjav/french/upsvtm.jar;. -Djava.library.path=${UPS_HOME}/upsvtm/bin;${UPS_HOME}/upsnet/bin;${UPS_HOME}/upscmp/bin;${UPS_HOME}/upscom/bin;${UPS_HOME}/upscrb/bin;${UPS_HOME}/upsjav/bin;${UPS_HOME}/upsjav/bin/french type
Fichier source
import UpsKrn.Caractere;
import UpsKrn.Entier;
import UpsKrn.Exception;
import UpsKrn.Objet;
import UpsKrn.Tableau;
import UpsKrn.Type;
import UpsKrn.MUpsKrn;
import UpsKrn.UpsException;
public class type
/******************/
{
public static void main(String s[])
/*********************************/
{
Entier E;
Type T;
Objet O;
try
{
if (!MUpsKrn.Demarrer())
T=(Type)MUpsKrn.Type().EnumererObjets(null);
while (T!=null)
{
System.out.println(MUpsKrn.Caractere2JavaString(T.NomType()));
T=(Type)MUpsKrn.Type().EnumererObjets(T);
}
System.out.println("\n");
System.out.println(MUpsKrn.Caractere2JavaString(MUpsKrn.Binaire().NomType()));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsKrn.Caractere().NomType()));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsKrn.Date().NomType()));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsKrn.Entier().NomType()));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsKrn.Enumere().NomType()));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsKrn.Exception().NomType()));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsSys.Fichier().NomType()));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsKrn.Module().NomType()));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsKrn.Objet().NomType()));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsKrn.Reel().NomType()));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsKrn.Type().NomType()));
E=MUpsKrn.JavaInt2Entier(1);
E.Incrementer(false);
if (MUpsKrn.Booleen2JavaBoolean(E.Egal(MUpsKrn.JavaInt2Entier(2))))
else
if (MUpsKrn.Booleen2JavaBoolean(T.Egal(MUpsKrn.Date())))
System.out.println("T==Date");
if (MUpsKrn.Booleen2JavaBoolean(T.Different(MUpsKrn.Date())))
System.out.println("T!=Date");
System.out.println(MUpsKrn.Caractere2JavaString(T.NomType()));
E.Convertir(MUpsKrn.Entier().NouvelObjet());
System.out.println(MUpsKrn.Entier2JavaInt(E));
E.Convertir(MUpsKrn.Exception().NouvelObjet());
System.out.println(MUpsKrn.Entier2JavaInt(E));
MUpsKrn.Arreter();
}
catch (java.lang.Throwable e)
{
try
{
System.out.println("Erreur UpsKrn-0 : L'exception suivante a été envoyée dans le source '"
+e.NomSourceEnErreur+"' ligne "+e.NumeroLigne+", colonne "+e.NumeroColonne+" :");
System.out.println(e.MessageErreur);
}
catch (java.lang.Throwable e2)
{
System.out.println(e2.toString());
}
}
}
}