Round Fonksiyonu [VBA]

Yuvarla işlevi, belirli bir sayıya yuvarlanmış bir sayı döndürür.

warning

This function or constant is enabled with the statement Option VBASupport 1 placed before the executable program code in a module.


Sözdizimi:


        Round( expression as Double [,numdecimalplaces as Integer] ) 
    

Dönüş değeri:

Double

Parametreler:

ifade: Gerekli. Yuvarlanacak sayısal ifade.

basamaksayısı: Seçimsel. Yuvarlamada ondalığın sağında kaç basamak olacağını belirtir. Varsayılan 0'dır.

Hata kodları:

5 Geçersiz yordam çağrısı

Örnek:


        REM ***** BASIC *****
        Option VBASupport 1
        Sub Example_Round
         Dim r 
         r = Pi
         print r ' 3,14159265358979
         print Round(r, 5) ' 3,14159
         r = exp(1)
         print r ' 2,71828182845904
         print Round(r) ' 3
        End Sub
    

Please support us!