65 lines
No EOL
2.8 KiB
XML
65 lines
No EOL
2.8 KiB
XML
<?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="textsbasicshared03080401xml" indexer="include" status="PUBLISH">
|
|
<title id="tit" xml-lang="en-US">Sqr Function</title>
|
|
<filename>/text/sbasic/shared/03080401.xhp</filename>
|
|
</topic>
|
|
</meta>
|
|
|
|
<body>
|
|
|
|
|
|
<section id="sqr">
|
|
<bookmark xml-lang="en-US" branch="index" id="bm_id3156027">
|
|
<bookmark_value>Sqr function</bookmark_value>
|
|
</bookmark>
|
|
|
|
|
|
<h1 id="hd_id3156027"><link href="text/sbasic/shared/03080401.xhp">Sqr Function</link></h1>
|
|
<paragraph id="par_id3147226" role="paragraph" xml-lang="en-US">Calculates the square root of a numeric expression.</paragraph>
|
|
</section>
|
|
|
|
<h2 id="hd_id3143267">Syntax:</h2>
|
|
<bascode>
|
|
<paragraph id="par_id3149415" role="bascode" xml-lang="en-US">Sqr (Number)</paragraph>
|
|
</bascode>
|
|
|
|
<h2 id="hd_id3156023">Return value:</h2>
|
|
<paragraph id="par_id3156343" localize="false" role="paragraph">Double</paragraph>
|
|
|
|
<h2 id="hd_id3147265">Parameters:</h2>
|
|
<paragraph id="par_id3149457" role="paragraph" xml-lang="en-US"> <emph>Number:</emph> Any numeric expression that you want to calculate the square root for.</paragraph>
|
|
<paragraph id="par_id3154365" role="paragraph" xml-lang="en-US">A square root is the number that you multiply by itself to produce another number, for example, the square root of 36 is 6.</paragraph>
|
|
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
|
|
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
|
|
|
|
<h2 id="hd_id3153192">Example:</h2>
|
|
<bascode>
|
|
<paragraph id="par_idm1341602560" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSqr</paragraph>
|
|
<paragraph id="par_idm1341601328" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Single</paragraph>
|
|
<paragraph id="par_idm1341600096" role="bascode" localize="false" xml-lang="en-US"> iVar = 36</paragraph>
|
|
<paragraph id="par_idm1341598864" role="bascode" localize="false" xml-lang="en-US"> MsgBox Sqr(iVar)</paragraph>
|
|
<paragraph id="par_idm1341597632" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
|
|
</bascode>
|
|
</body>
|
|
|
|
</helpdocument> |