Bonjour,
Je voudrais savoir s'il est possible de sortir plusieurs variables à partir d'une fonction (dans un tableau par exemple). VOici mon code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 Public Function convert_degre_to_decimal(ByVal D_lat As Integer, ByVal M_lat As Integer, ByVal S_lat As Decimal, _ ByVal NS As String, ByVal D_lon As Integer, ByVal M_lon As Integer, ByVal S_lon As Decimal, ByVal WE As String) As String 'Converti les coordonnées GPS du format DMS au format decimal Dim latitude, longitude As Decimal 'Calcul de la latitude If NS = "N" Then latitude = Math.Round(D_lat + M_lat / 60 + S_lat / 3600, 3) ElseIf NS = "S" Then latitude = -(Math.Round(D_lat + M_lat / 60 + S_lat / 3600, 3)) End If 'Calcul de la longitude If WE = "E" Then longitude = Math.Round(D_lon + M_lon / 60 + S_lon / 3600, 3) ElseIf WE = "W" Then longitude = -(Math.Round(D_lon + M_lon / 60 + S_lon / 3600, 3)) End If convert_degre_to_decimal = latitude & " " & longitude End Function
Je voudrais récupérer mes deux variables indépendemment dans un tableau par exemple. Est-ce possible?
Merci de votre aide!
Partager