summaryrefslogtreecommitdiff
path: root/source/text/sbasic/shared/03140012.xhp
blob: 9ad42e26b707b24de7a8c5e86a15bfff98fedfa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">
<!--
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->

<meta>
  <topic id="textsbasicshared03140012xml" indexer="include" status="PUBLISH">
    <title id="tit" xml-lang="en-US">SYD Function [VBA]</title>
    <filename>/text/sbasic/shared/03140012.xhp</filename>
  </topic>
</meta>

<body>


<section id="syd">
<bookmark xml-lang="en-US" branch="index" id="bm_id3150499">
  <bookmark_value>SYD function</bookmark_value>
</bookmark>


<paragraph id="hd_id3150499" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03140012.xhp" name="SYD Function [VBA]">SYD Function [VBA]</link></paragraph>
<paragraph id="par_id3151384" role="paragraph" xml-lang="en-US">Returns the arithmetic-declining depreciation rate.</paragraph>
</section>
<embed href="text/sbasic/shared/00000003.xhp#vbasupport"/>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
<paragraph id="par_id3143267" role="bascode" localize="false" xml-lang="en-US">SYD (Cost as Double, Salvage as Double, Life as Double, Period as Double)</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
<paragraph id="par_id3150669" role="paragraph" localize="false" xml-lang="en-US">Double</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph id="par_id240720170117391741" role="paragraph" xml-lang="en-US"><emph>Cost</emph> is the initial cost of an asset.</paragraph>
<paragraph id="par_id24072017011739895" role="paragraph" xml-lang="en-US"><emph>Salvage</emph> is the value of an asset at the end of the depreciation.</paragraph>
<paragraph id="par_id240720170117395610" role="paragraph" xml-lang="en-US"><emph>Life</emph> is the depreciation period determining the number of periods in the depreciation of the asset.</paragraph>
<paragraph id="par_id240720170144224764" role="paragraph" xml-lang="en-US"><emph>Period</emph> is the period number for which you want to calculate the depreciation.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph id="par_id240720170144228912" role="bascode" localize="false" xml-lang="en-US">REM ***** BASIC *****</paragraph>
<paragraph id="par_id240720170144225359" role="bascode" localize="false" xml-lang="en-US">Option VBASupport 1</paragraph>
<paragraph id="par_id240720170144227525" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSYD</paragraph>
<paragraph id="par_id240720170144225698" role="bascode" xml-lang="en-US">REM Calculate the yearly depreciation of an asset that cost $10,000 at</paragraph>
<paragraph id="par_id240720170144223210" role="bascode" xml-lang="en-US">REM the start of year 1, and has a salvage value of $1,000 after 5 years.</paragraph>
<paragraph id="par_id240720170144227162" role="bascode" localize="false" xml-lang="en-US">Dim syd_yr1 As Double</paragraph>
<paragraph id="par_id240720170144223139" role="bascode" xml-lang="en-US">REM Calculate the depreciation during year 1.</paragraph>
<paragraph id="par_id240720170144228546" role="bascode" localize="false" xml-lang="en-US">syd_yr1 = SYD( 10000, 1000, 5, 1 )</paragraph>
<paragraph id="par_id240720170144221476" role="bascode" xml-lang="en-US">print syd_yr1 ' syd_yr1 is now equal to 3000.</paragraph>
<paragraph id="par_id240720170144221275" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
</bascode>

<section id="relatedtopics">
<paragraph id="par_id061420170153186192" role="paragraph" xml-lang="en-US"><link href="text/scalc/01/04060103.xhp#bm_id3152978">SYD function in CALC</link></paragraph>
<embed href="text/sbasic/shared/00000003.xhp#VBA-Financial"/>
</section>
</body>

</helpdocument>
-3'>libreoffice-4-1-3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sw/inc/fmtautofmt.hxx
AgeCommit message (Expand)Author
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
2016-08-19Resolves: coverity#705366 Mixing enum typesCaolán McNamara
2016-04-14loplugin:passstuffbyref in swNoel Grandin
2015-11-115th step to remove tools/rtti.hxxOliver Specht
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-11-06com::sun::star->css in sw/incNoel Grandin
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann
2015-10-02loplugin:unusedmethodsNoel Grandin
2015-08-14remove default value from SfxPoolItem::PutValueNoel Grandin
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier
2015-04-16Revert "make more classes dllpublic"David Tardon
2015-04-16make more classes dllpublicDavid Tardon
2015-02-25Extract SwFmtAutoFmt::dumpAsXml() from SwTxtNodeMiklos Vajna
2015-02-18boost->stdCaolán McNamara
2015-02-07loplugin:deletedspecialStephan Bergmann
2014-07-29simplify return argument of SfxPoolItem::GetPresentationNoel Grandin
2014-05-27Remove ASCII art and useless comments from sw moduleChris Laplante
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann
2014-03-26Split TYPEINFO into plain and TYPEINFO_OVERRIDEStephan Bergmann
2014-02-27Remove visual noise from swAlexander Wilms
2014-01-10SfxPoolItem::operator ==, != should return boolStephan Bergmann
2013-11-05fixincludeguards.sh: swThomas Arnhold
2013-01-28fdo#38838 Some removal/replacement of the String/UniString with OUStringJean-Noël Rouvignac