Share via


Financial.SLN(Double, Double, Double) Método

Definição

Retorna um valor que especifica a depreciação linear de um ativo em um único período.

public:
 static double SLN(double Cost, double Salvage, double Life);
public static double SLN (double Cost, double Salvage, double Life);
static member SLN : double * double * double -> double
Public Function SLN (Cost As Double, Salvage As Double, Life As Double) As Double

Parâmetros

Cost
Double

Obrigatórios. O custo inicial do ativo.

Salvage
Double

Obrigatórios. O valor do ativo no final da vida útil.

Life
Double

Obrigatórios. A duração da vida útil do ativo.

Retornos

A depreciação linear de um ativo em um único período.

Exceções

Life = 0.

Exemplos

Este exemplo usa a SLN função para retornar a depreciação em linha reta de um ativo por um único período, dado o custo inicial do ativo (InitCost), o valor de salvamento no final da vida útil do ativo (SalvageVal) e a vida total do ativo em anos (LifeTime).

Dim InitCost, SalvageVal, LifeTime, DepYear As Double
Dim Fmt As String = "###,##0.00"

InitCost = CDbl(InputBox("What's the initial cost of the asset?"))
SalvageVal = CDbl(InputBox("Enter the asset's value at end of its life."))
LifeTime = CDbl(InputBox("What's the asset's useful life in years?"))

' Use the SLN function to calculate the deprecation per year.
Dim SlnDepr As Double = SLN(InitCost, SalvageVal, LifeTime)
Dim msg As String = "The depreciation per year: " & Format(SlnDepr, Fmt)
msg &= vbCrLf & "Year" & vbTab & "Linear" & vbTab & "Doubling" & vbCrLf

' Use the SYD and DDB functions to calculate the deprecation for each year.
For DepYear = 1 To LifeTime
    msg &= DepYear & vbTab & 
        Format(SYD(InitCost, SalvageVal, LifeTime, DepYear), Fmt) & vbTab & 
        Format(DDB(InitCost, SalvageVal, LifeTime, DepYear), Fmt) & vbCrLf
Next
MsgBox(msg)

Comentários

O período de depreciação deve ser expresso na mesma unidade que o Life argumento . Todos os argumentos devem ser números positivos.

Aplica-se a

Confira também