Reel

Commande de compilation

Dans le menu Project - References de Visual Basic, il faut importer les déclarations du module Up ! Kernel en cochant la case correspondante.

Commande d'enregistrement des ActiveX

upsvtm Com=Charger

Commande d'exécution

reel.exe

Fichier source

Dim MUpsKrn As IUpsKrn

Private Sub EcrireEcran(ByVal Libelle As String)
' ==============================================
Ecran.AddItem Libelle
End Sub

Private Sub Form_Load()
' =====================
Dim A As IUpsKrnReel
Dim B As Double

On Error GoTo GestionErreur

Set MUpsKrn = CreateObject("UpsApp.UpsKrn")

Set A = MUpsKrn.ComDouble2Reel(1#)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 1#
EcrireEcran Str$(B)

Set A = A.Additionner(MUpsKrn.ComDouble2Reel(1#))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B + 1#
EcrireEcran Str$(B)

Set A = A.Soustraire2(MUpsKrn.ComDouble2Reel(10#))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B - 10#
EcrireEcran Str$(B)

Set A = A.Multiplier(MUpsKrn.ComDouble2Reel(10#))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B * 10#
EcrireEcran Str$(B)

Set A = A.Diviser(MUpsKrn.ComDouble2Reel(5#))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B / 5#
EcrireEcran Str$(B)

Set A = A.Puissance(MUpsKrn.ComDouble2Reel(3#))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B ^ 3#
EcrireEcran Str$(B)

Set A = MUpsKrn.ComDouble2Reel(1#)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 1#
EcrireEcran Str$(B)

Set A = MUpsKrn.ComDouble2Reel(1#).Additionner(A)
EcrireEcran MUpsKrn.Reel2ComDouble(A)
B = 1# + B
EcrireEcran Str$(B)

Set A = MUpsKrn.ComDouble2Reel(10#).Soustraire2(A)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 10# - B
EcrireEcran Str$(B)

Set A = MUpsKrn.ComDouble2Reel(10#).Multiplier(A)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 10# * B
EcrireEcran Str$(B)

Set A = MUpsKrn.ComDouble2Reel(5#).Diviser(A)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 5# / B
EcrireEcran Str$(B)

Set A = MUpsKrn.ComDouble2Reel(3#).Puissance(A)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 3# ^ B
EcrireEcran Str$(B)

Set A = MUpsKrn.ComDouble2Reel(1#)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 1#
EcrireEcran Str$(B)

A.AdditionnerAffecter MUpsKrn.ComDouble2Reel(1#)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B + 1#
EcrireEcran Str$(B)

A.SoustraireAffecter MUpsKrn.ComDouble2Reel(10#)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B - 10#
EcrireEcran Str$(B)

A.MultiplierAffecter MUpsKrn.ComDouble2Reel(10#)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B * 10#
EcrireEcran Str$(B)

A.PuissanceAffecter MUpsKrn.ComDouble2Reel(3#)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B ^ 3#
EcrireEcran Str$(B)

Set A = MUpsKrn.Reel2(MUpsKrn.ComInt2Entier(1))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 1
EcrireEcran Str$(B)

Set A = A.Additionner2(MUpsKrn.ComInt2Entier(1))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B + 1
EcrireEcran Str$(B)

Set A = A.Soustraire3(MUpsKrn.ComInt2Entier(10))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B - 10
EcrireEcran Str$(B)

Set A = A.Multiplier2(MUpsKrn.ComInt2Entier(10))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B * 10
EcrireEcran Str$(B)

Set A = A.Diviser2(MUpsKrn.ComInt2Entier(5))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B / 5
EcrireEcran Str$(B)

Set A = A.Puissance2(MUpsKrn.ComInt2Entier(3))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B ^ 3
EcrireEcran Str$(B)

Set A = MUpsKrn.Reel2(MUpsKrn.ComInt2Entier(1))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 1
EcrireEcran Str$(B)

Set A = MUpsKrn.ComInt2Entier(1).Additionner2(A)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 1 + B
EcrireEcran Str$(B)

Set A = MUpsKrn.ComInt2Entier(1).Soustraire3(A)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 1 - B
EcrireEcran Str$(B)

Set A = MUpsKrn.ComInt2Entier(1).Multiplier2(A)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 1 * B
EcrireEcran Str$(B)

Set A = MUpsKrn.ComInt2Entier(5).Diviser2(A)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 5 / B
EcrireEcran Str$(B)

Set A = MUpsKrn.ComInt2Entier(3).Puissance2(A)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 3 ^ B
EcrireEcran Str$(B)

Set A = MUpsKrn.Reel2(MUpsKrn.ComInt2Entier(1))
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = 1
EcrireEcran Str$(B)

A.AdditionnerAffecter2 MUpsKrn.ComInt2Entier(1)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B + 1
EcrireEcran Str$(B)

A.SoustraireAffecter2 MUpsKrn.ComInt2Entier(10)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B - 10
EcrireEcran Str$(B)

A.MultiplierAffecter2 MUpsKrn.ComInt2Entier(10)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B * 10
EcrireEcran Str$(B)

A.PuissanceAffecter2 MUpsKrn.ComInt2Entier(3)
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B ^ 3
EcrireEcran Str$(B)

A.Incrementer False
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B + 1
EcrireEcran Str$(B)

A.Decrementer False
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B - 1
EcrireEcran Str$(B)

A.Incrementer True
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B + 1
EcrireEcran Str$(B)

A.Decrementer True
EcrireEcran Str$(MUpsKrn.Reel2ComDouble(A))
B = B - 1
EcrireEcran Str$(B)

If MUpsKrn.Booleen2ComVariantBool(A.Egal(MUpsKrn.ComDouble2Reel(1#))) Then End If
If MUpsKrn.Booleen2ComVariantBool(A.DIfferent(MUpsKrn.ComDouble2Reel(1#))) Then End If
If MUpsKrn.Booleen2ComVariantBool(A.InferieurOuEgal(MUpsKrn.ComDouble2Reel(1#))) Then End If
If MUpsKrn.Booleen2ComVariantBool(A.SuperieurOuEgal(MUpsKrn.ComDouble2Reel(1#))) Then End If
If MUpsKrn.Booleen2ComVariantBool(A.Inferieur(MUpsKrn.ComDouble2Reel(1#))) Then End If
If MUpsKrn.Booleen2ComVariantBool(A.Superieur(MUpsKrn.ComDouble2Reel(1#))) Then End If

If B = 1# Then End If
If B <> 1# Then End If
If B <= 1# Then End If
If B >= 1# Then End If
If B < 1# Then End If
If B > 1# Then End If

If MUpsKrn.Booleen2ComVariantBool(A.Egal2(MUpsKrn.ComInt2Entier(1))) Then End If
If MUpsKrn.Booleen2ComVariantBool(A.DIfferent2(MUpsKrn.ComInt2Entier(1))) Then End If
If MUpsKrn.Booleen2ComVariantBool(A.InferieurOuEgal2(MUpsKrn.ComInt2Entier(1))) Then End If
If MUpsKrn.Booleen2ComVariantBool(A.SuperieurOuEgal2(MUpsKrn.ComInt2Entier(1))) Then End If
If MUpsKrn.Booleen2ComVariantBool(A.Inferieur2(MUpsKrn.ComInt2Entier(1))) Then End If
If MUpsKrn.Booleen2ComVariantBool(A.Superieur2(MUpsKrn.ComInt2Entier(1))) Then End If

If B = 1 Then End If
If B <> 1 Then End If
If B <= 1 Then End If
If B >= 1 Then End If
If B < 1 Then End If
If B > 1 Then End If

If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComDouble2Reel(1#).Egal(A)) Then End If
If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComDouble2Reel(1#).DIfferent(A)) Then End If
If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComDouble2Reel(1#).InferieurOuEgal(A)) Then End If
If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComDouble2Reel(1#).SuperieurOuEgal(A)) Then End If
If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComDouble2Reel(1#).Inferieur(A)) Then End If
If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComDouble2Reel(1#).Superieur(A)) Then End If

If 1# = B Then End If
If 1 <> B Then End If
If 1# <= B Then End If
If 1# >= B Then End If
If 1# < B Then End If
If 1# > B Then End If

If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComInt2Entier(1).Egal2(A)) Then End If
If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComInt2Entier(1).DIfferent2(A)) Then End If
If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComInt2Entier(1).InferieurOuEgal2(A)) Then End If
If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComInt2Entier(1).SuperieurOuEgal2(A)) Then End If
If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComInt2Entier(1).Inferieur2(A)) Then End If
If MUpsKrn.Booleen2ComVariantBool(MUpsKrn.ComInt2Entier(1).Superieur2(A)) Then End If

If 1 = B Then End If
If 1 <> B Then End If
If 1 <= B Then End If
If 1 >= B Then End If
If 1 < B Then End If
If 1 > B Then End If

Set A = Nothing
Set MUpsKrn = Nothing
Exit Sub

GestionErreur:
'=============
EcrireEcran Erreur UpsKrn-0 : L'exception suivante a été envoyée dans le source '" + Err.Source + "' :"
EcrireEcran Err.Description
End Sub