# WishAdd a space after each comma and function word automatically.

D

#### Deleted member 103

##### Guest
I know you can write a code like this
B4X:
``````Public Sub DistanceInMeters(Lat1 As Double,Long1 As Double,Alt1 As Int,Lat2 As Double,Long2 As Double,Alt2 As Int) As Double
Dim XYZ1(3) As Double=LocationToPoint(Lat1,Long1,Alt1)
Dim XYZ2(3) As Double=LocationToPoint(Lat2,Long2,Alt2)
Dim dx As Double=XYZ1(0)-XYZ2(0)
Dim dy As Double=XYZ1(1)-XYZ2(1)
Dim dz As Double=XYZ1(2)-XYZ2(2)
Return Sqrt(dx*dx+dy*dy+dz*dz)/1000
End Sub``````

But with blank is much more readable.
B4X:
``````Public Sub DistanceInMeters(Lat1 As Double, Long1 As Double, Alt1 As Int, Lat2 As Double, Long2 As Double, Alt2 As Int) As Double
Dim XYZ1(3) As Double = LocationToPoint(Lat1, Long1, Alt1)
Dim XYZ2(3) As Double = LocationToPoint(Lat2, Long2, Alt2)
Dim dx As Double = XYZ1(0) - XYZ2(0)
Dim dy As Double = XYZ1(1) - XYZ2(1)
Dim dz As Double = XYZ1(2) - XYZ2(2)
Return Sqrt (dx*dx + dy*dy + dz*dz) / 1000
End Sub``````

#### LucaMs

##### Expert
Longtime User
Useful, but not while you're writing, after (reformatting on "line lostfocus" ); because I'm so used to put a space that otherwise I would have it two

Return Sqrt (dx*dx + dy*dy + dz*dz) / 1000
B4X:
``Return Sqrt(dx * dx + dy * dy + dz * dz) / 1000``

D

#### Deleted member 103

##### Guest
reformatting on "line lostfocus"
That's obvious!
In Visual Studio is also made that way.

#### JakeBullet70

##### Well-Known Member
Longtime User
I agree and disagree. I like VS doing it's thing but also like the freedom to format certain thing's certain ways.

#### LucaMs

##### Expert
Longtime User
I agree and disagree. I like VS doing it's thing but also like the freedom to format certain thing's certain ways.
I agree but I don't disagree (with your post )

Replies
5
Views
660
Replies
4
Views
654
Replies
163
Views
58K
Replies
7
Views
3K
Replies
19
Views
48K