Nls
Commande de compilation
javac -g -classpath ${UPS_HOME}/upsjav/upsjav/french/upsvtm.jar nls.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 nls
Fichier source
import UpsKrn.Caractere;
import UpsKrn.MUpsKrn;
import UpsKrn.UpsException;
import UpsSys.MUpsSys;
import UpsNls.MUpsNls;
public class nls
/******************/
{
public static void main(String s[])
/*********************************/
{
Caractere C;
try
{
if (!MUpsKrn.Demarrer())
if (!MUpsSys.Demarrer())
if (!MUpsNls.Demarrer())
if (MUpsNls.Pays()==MUpsNls.PaysFrance)
System.out.println("Pays==PaysFrance");
else
System.out.println("Pays!=PaysFrance");
if (MUpsSys.PageDeCode()==MUpsSys.PageWE8Iso8859P1)
System.out.println("PageDeCode==PageWE8Iso8859P1");
else
System.out.println("PageDeCode!=PageWE8Iso8859P1");
if (MUpsNls.FuseauHoraire()==MUpsNls.FuseauBruxellesMadridParis)
System.out.println("FuseauHoraire==FuseauBruxellesMadridParis");
else
System.out.println("FuseauHoraire!=FuseauBruxellesMadridParis");
if (MUpsNls.Metrique()==MUpsNls.MetriqueMetre)
System.out.println("Metrique==MetriqueMetre");
else
System.out.println("Metrique!=MetriqueMetre");
if (MUpsNls.SousMetrique()==MUpsNls.SousMetriqueCentimetre)
System.out.println("SousMetrique==MetriqueCentimetre");
else
System.out.println("SousMetrique!=MetriqueCentimetre");
if (MUpsNls.SubMetrique()==MUpsNls.SubMetriqueKilometre)
System.out.println("SubMetrique==SubMetriqueKilometre");
else
System.out.println("SubMetrique!=SubMetriqueKilometre");
if (MUpsNls.Poids()==MUpsNls.PoidsKilogramme)
System.out.println("Poids==PoidsKilogramme");
else
System.out.println("Poids!=PoidsKilogramme");
if (MUpsNls.Temperature()==MUpsNls.TemperatureCelsius)
System.out.println("Temperature==TemperatureCelsius");
else
System.out.println("Temperature!=TemperatureCelsius");
if (MUpsNls.Angle()==MUpsNls.AngleDegre)
System.out.println("Angle==AngleDegre");
else
System.out.println("Angle!=AngleDegre");
System.out.println("SymboleDecimale="+MUpsKrn.Caractere2JavaString(MUpsNls.SymboleDecimale()));
System.out.println("SymboleVirgule="+MUpsKrn.Caractere2JavaString(MUpsNls.SymboleVirgule()));
System.out.println("SymboleMonetaire="+MUpsKrn.Caractere2JavaString(MUpsNls.SymboleMonetaire()));
System.out.println("SymboleMetrique="+MUpsKrn.Caractere2JavaString(MUpsNls.SymboleMetrique()));
System.out.println("SymboleSousMetrique="+MUpsKrn.Caractere2JavaString(MUpsNls.SymboleSousMetrique()));
System.out.println("SymboleSubMetrique="+MUpsKrn.Caractere2JavaString(MUpsNls.SymboleSubMetrique()));
System.out.println("SymbolePoids="+MUpsKrn.Caractere2JavaString(MUpsNls.SymbolePoids()));
System.out.println("SymboleTemperature="+MUpsKrn.Caractere2JavaString(MUpsNls.SymboleTemperature()));
System.out.println("SymboleAngle="+MUpsKrn.Caractere2JavaString(MUpsNls.SymboleAngle()));
System.out.println("UniteMonetaire="+MUpsKrn.Caractere2JavaString(MUpsNls.UniteMonetaire()));
System.out.println("UniteMetrique="+MUpsKrn.Caractere2JavaString(MUpsNls.UniteMetrique()));
System.out.println("UniteSousMetrique="+MUpsKrn.Caractere2JavaString(MUpsNls.UniteSousMetrique()));
System.out.println("UniteSubMetrique="+MUpsKrn.Caractere2JavaString(MUpsNls.UniteSubMetrique()));
System.out.println("UnitePoids="+MUpsKrn.Caractere2JavaString(MUpsNls.UnitePoids()));
System.out.println("UniteTemperature="+MUpsKrn.Caractere2JavaString(MUpsNls.UniteTemperature()));
System.out.println("UniteAngle="+MUpsKrn.Caractere2JavaString(MUpsNls.UniteAngle()));
System.out.println(MUpsKrn.Caractere2JavaString(Caractere.Caractere5(MUpsKrn.JavaLong2Entier(12345))));
System.out.println(MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(12345.67))));
System.out.println(MUpsKrn.Caractere2JavaString(Caractere.Caractere6(MUpsKrn.JavaLong2Entier(12345),MUpsNls.FiltreMonnaieEntier())));
System.out.println(MUpsKrn.Caractere2JavaString(Caractere.Caractere9(MUpsKrn.JavaDouble2Reel(12345.67),MUpsNls.FiltreMonnaieReel())));
System.out.println(MUpsKrn.Caractere2JavaString(Caractere.Caractere3(MUpsSys.DateSysteme())));
System.out.println(MUpsKrn.Caractere2JavaString(Caractere.Caractere4(MUpsSys.DateSysteme(),MUpsNls.FiltreDate())));
System.out.println(MUpsKrn.Caractere2JavaString(Caractere.Caractere4(MUpsSys.DateSysteme(),MUpsNls.FiltreHeure())));
System.out.println("Le cours du Dollar="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.UnDollar()))));
System.out.println("Le cours de la Livre="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.UneLivre()))));
System.out.println("Le cours du Yen="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.CentYens()))));
System.out.println("Le cours de l'Euro="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.UnEuro()))));
System.out.println("Heure de Paris="+MUpsKrn.Caractere2JavaString(Caractere.Caractere3(MUpsNls.ChangerFuseauHoraire(MUpsSys.DateSysteme(),MUpsNls.FuseauHoraire(),
MUpsNls.FuseauBruxellesMadridParis))));
System.out.println("Heure de New York="+MUpsKrn.Caractere2JavaString(Caractere.Caractere3(MUpsNls.ChangerFuseauHoraire(MUpsSys.DateSysteme(),MUpsNls.FuseauHoraire(),
MUpsNls.FuseauEstAmerique))));
System.out.println("1 m en yd="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirMetrique(1.0,MUpsNls.MetriqueMetre,MUpsNls.MetriqueYard)))));
System.out.println("1 yd en m="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirMetrique(1.0,MUpsNls.MetriqueYard,MUpsNls.MetriqueMetre)))));
System.out.println("1 cm en ''="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSousMetrique(1.0,MUpsNls.SousMetriqueCentimetre,MUpsNls.SousMetriquePouce)))));
System.out.println("1 cm en '="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSousMetrique(1.0,MUpsNls.SousMetriqueCentimetre,MUpsNls.SousMetriquePied)))));
System.out.println("1 '' en cm="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSousMetrique(1.0,MUpsNls.SousMetriquePouce,MUpsNls.SousMetriqueCentimetre)))));
System.out.println("1 '' en '="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSousMetrique(1.0,MUpsNls.SousMetriquePouce,MUpsNls.SousMetriquePied)))));
System.out.println("1 ' en cm="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSousMetrique(1.0,MUpsNls.SousMetriquePied,MUpsNls.SousMetriqueCentimetre)))));
System.out.println("1 ' en ''="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSousMetrique(1.0,MUpsNls.SousMetriquePied,MUpsNls.SousMetriquePouce)))));
System.out.println("1 km en m terrestre="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSubMetrique(1.0,MUpsNls.SubMetriqueKilometre,MUpsNls.SubMetriqueMilleTerrestre)))));
System.out.println("1 km en m marin="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSubMetrique(1.0,MUpsNls.SubMetriqueKilometre,MUpsNls.SubMetriqueMilleMarin)))));
System.out.println("1 m terrestre en km="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSubMetrique(1.0,MUpsNls.SubMetriqueMilleTerrestre,MUpsNls.SubMetriqueKilometre)))));
System.out.println("1 m terrestre en m marin="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSubMetrique(1.0,MUpsNls.SubMetriqueMilleTerrestre,MUpsNls.SubMetriqueMilleMarin)))));
System.out.println("1 m marin en km="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSubMetrique(1.0,MUpsNls.SubMetriqueMilleMarin,MUpsNls.SubMetriqueKilometre)))));
System.out.println("1 m marin en m terrestre="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSubMetrique(1.0,MUpsNls.SubMetriqueMilleMarin,MUpsNls.SubMetriqueMilleTerrestre)))));
System.out.println("1 kg en lb="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirPoids(1.0,MUpsNls.PoidsKilogramme,MUpsNls.PoidsLivre)))));
System.out.println("1 kg en oz="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirPoids(1.0,MUpsNls.PoidsKilogramme,MUpsNls.PoidsOnce)))));
System.out.println("1 lb en kg="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirPoids(1.0,MUpsNls.PoidsLivre,MUpsNls.PoidsKilogramme)))));
System.out.println("1 lb en kg="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirPoids(1.0,MUpsNls.PoidsLivre,MUpsNls.PoidsOnce)))));
System.out.println("1 oz en kg="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirPoids(1.0,MUpsNls.PoidsOnce,MUpsNls.PoidsKilogramme)))));
System.out.println("1 oz en lb="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirPoids(1.0,MUpsNls.PoidsOnce,MUpsNls.PoidsLivre)))));
System.out.println("0 °K en °C="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirTemperature(0.0,MUpsNls.TemperatureKelvin,MUpsNls.TemperatureCelsius)))));
System.out.println("0 °K en °F="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirTemperature(0.0,MUpsNls.TemperatureKelvin,MUpsNls.TemperatureFahrenheit)))));
System.out.println("0 °C en °K="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirTemperature(0.0,MUpsNls.TemperatureCelsius,MUpsNls.TemperatureKelvin)))));
System.out.println("0 °C en °F="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirTemperature(0.0,MUpsNls.TemperatureCelsius,MUpsNls.TemperatureFahrenheit)))));
System.out.println("0 °F en °K="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirTemperature(0.0,MUpsNls.TemperatureFahrenheit,MUpsNls.TemperatureKelvin)))));
System.out.println("0 °F en °C="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirTemperature(0.0,MUpsNls.TemperatureFahrenheit,MUpsNls.TemperatureCelsius)))));
System.out.println("Pi rad en °="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirAngle(3.1416,MUpsNls.AngleRadian,MUpsNls.AngleDegre)))));
System.out.println("Pi rad en gr="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirAngle(3.1416,MUpsNls.AngleRadian,MUpsNls.AngleGrade)))));
System.out.println("90 ° en rad="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirAngle(90.0,MUpsNls.AngleDegre,MUpsNls.AngleRadian)))));
System.out.println("90 ° en gr="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirAngle(90.0,MUpsNls.AngleDegre,MUpsNls.AngleGrade)))));
System.out.println("100 gr en rad="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirAngle(100.0,MUpsNls.AngleGrade,MUpsNls.AngleRadian)))));
System.out.println("100 gr en °="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirAngle(100.0,MUpsNls.AngleGrade,MUpsNls.AngleDegre)))));
System.out.println("1 cm en m="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSousMetriqueEnMetrique(1.0,MUpsNls.SousMetriqueCentimetre,MUpsNls.MetriqueMetre)))));
System.out.println("1 '' en m="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSousMetriqueEnMetrique(1.0,MUpsNls.SousMetriquePouce,MUpsNls.MetriqueMetre)))));
System.out.println("1 ' en m="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSousMetriqueEnMetrique(1.0,MUpsNls.SousMetriquePied,MUpsNls.MetriqueMetre)))));
System.out.println("1 m en cm="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirMetriqueEnSousMetrique(1.0,MUpsNls.MetriqueMetre,MUpsNls.SousMetriqueCentimetre)))));
System.out.println("1 m en ''="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirMetriqueEnSousMetrique(1.0,MUpsNls.MetriqueMetre,MUpsNls.SousMetriquePouce)))));
System.out.println("1 m en '="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirMetriqueEnSousMetrique(1.0,MUpsNls.MetriqueMetre,MUpsNls.SousMetriquePied)))));
System.out.println("1 km en m="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSubMetriqueEnMetrique(1.0,MUpsNls.SubMetriqueKilometre,MUpsNls.MetriqueMetre)))));
System.out.println("1 m terrestre en m="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSubMetriqueEnMetrique(1.0,MUpsNls.SubMetriqueMilleTerrestre,MUpsNls.MetriqueMetre)))));
System.out.println("1 m marin en m="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirSubMetriqueEnMetrique(1.0,MUpsNls.SubMetriqueMilleMarin,MUpsNls.MetriqueMetre)))));
System.out.println("1 m en km="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirMetriqueEnSubMetrique(1.0,MUpsNls.MetriqueMetre,MUpsNls.SubMetriqueKilometre)))));
System.out.println("1 m en m terrestre="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirMetriqueEnSubMetrique(1.0,MUpsNls.MetriqueMetre,MUpsNls.SubMetriqueMilleTerrestre)))));
System.out.println("1 m en m marin="+MUpsKrn.Caractere2JavaString(Caractere.Caractere8(MUpsKrn.JavaDouble2Reel(MUpsNls.ConvertirMetriqueEnSubMetrique(1.0,MUpsNls.MetriqueMetre,MUpsNls.SubMetriqueMilleMarin)))));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsNls.Message(MUpsKrn.UpsKrn(),MUpsKrn.JavaString2Caractere("Bonjour"),null,null,null,null,null)));
System.out.println(MUpsKrn.Caractere2JavaString(MUpsNls.Traduire(MUpsKrn.UpsKrn(),MUpsNls.SectionDivers,MUpsKrn.JavaString2Caractere("MerveilleuxUps"))));
MUpsNls.Arreter();
MUpsSys.Arreter();
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());
}
}
}
}