Translation

03100700.xhp bas_id911593692598060 help.text
English 7HRGK
Context English Estonian Actions
03100600.xhp
par_id3159414
help.text
If <literal>Expression</literal> lies outside the valid long integer range between -2.147.483.648 and 2.147.483.647, $[officename] Basic returns an overflow error.
03100600.xhp
par_id3150358
help.text
This function always rounds the fractional part of a number to the nearest integer. See funktsioon teisendab arvu murruosa lähima täisarvuni.
03100700.xhp
tit
help.text
Const Statement Const lause
03100700.xhp
bm_id3146958
help.text
<bookmark_value>Const statement</bookmark_value> <bookmark_value>Const lause</bookmark_value>
03100700.xhp
hd_id3146958
help.text
<variable id="const_h1"><link href="text/sbasic/shared/03100700.xhp" name="Const Statement">Const Statement</link></variable>
03100700.xhp
par_id3154143
help.text
Defines one or more identifiers as constants.
03100700.xhp
par_id3147264
help.text
A constant is a variable that helps to improve the readability of a program. Constants are not defined as a specific type of variable, but rather are used as placeholders in the code. You can only define a constant once and it cannot be modified.
03100700.xhp
par_id831588865616326
help.text
<image src="media/helpimg/sbasic/Const_statement.svg" id="img_id651588865616326"><alt id="alt_id281588865616326">Const syntax</alt></image>
03100700.xhp
par_id3150984
help.text
[Global|Private|Public] Const name = expression[, ...]
03100700.xhp
par_id3153897
help.text
<emph>name:</emph> Any identifier that follows the standard variable naming conventions.
03100700.xhp
par_id791593689338208
help.text
<emph>expression:</emph> Any literal expression.
03100700.xhp
par_id3150400
help.text
The data type must be omitted. When a library gets loaded in memory, %PRODUCTNAME Basic converts the program code internally so that each time a constant is used, the defined expression replaces it.
03100700.xhp
hd_id51593690561479
help.text
Scope
03100700.xhp
par_id431593690612961
help.text
By default constants are defined as private in modules and routines. Constants can be made public or global in order to be used from all modules, from all Basic libraries.
03100700.xhp
par_id241593693307830
help.text
<literal>Global</literal>, <literal>Private</literal> and <literal>Public</literal> specifiers can only be used for module constants.
03100700.xhp
bas_id911593692598060
help.text
Const EARTH = "♁" ' module scope
03100700.xhp
bas_id441593692601125
help.text
Private Const MOON = "☾" ' module scope
03100700.xhp
bas_id161593692601597
help.text
Public Const VENUS="♀", MARS="♂" ' general scope
03100700.xhp
bas_id581593692602046
help.text
Global Const SUN = "☉", STAR = "☆" ' general scope
03100700.xhp
par_idm1341160752
help.text
Const SUN = 3 * 1.456 / 56 ' SUN is local
03100700.xhp
par_idm1341159520
help.text
MsgBox SUN,, MOON ' SUN global constant is unchanged
03100700.xhp
par_id111593694878677
help.text
<link href="text/sbasic/shared/enum.xhp" name="Enum">Enum</link> statement
03100700.xhp
par_id111953694878677
help.text
<link href="text/sbasic/shared/03090413.xhp" name="Enum">Type</link> statement
03100900.xhp
tit
help.text
CSng Function CSng funktsioon
03100900.xhp
bm_id3153753
help.text
<bookmark_value>CSng function</bookmark_value> <bookmark_value>CSng funktsioon</bookmark_value>
03100900.xhp
hd_id3153753
help.text
<link href="text/sbasic/shared/03100900.xhp" name="CSng Function">CSng Function</link> <link href="text/sbasic/shared/03100900.xhp" name="CSng Function">CSng funktsioon</link>
03100900.xhp
par_id3149748
help.text
Converts any string or numeric expression to data type Single. Teisendab stringi või arvavaldise kuupäeva väärtuseks.
03100900.xhp
par_id3148983
help.text
CSng (Expression As Variant) As Single
03100900.xhp
par_id3153897
help.text
<emph>Expression</emph>: Any string or numeric expression that you want to convert. To convert a string expression, the number must be entered using a dot "." as the decimal point and a comma "," as the thousands separator (for instance 123,456.78), which may differ from your %PRODUCTNAME <link href="text/shared/optionen/01140000.xhp" name="language settings">language settings</link>.
03100900.xhp
par_id761652451117906
help.text
Numeric expressions are displayed according to %PRODUCTNAME <link href="text/shared/optionen/01140000.xhp" name="language settings">language settings</link>:
03100900.xhp
par_idm1341608224
help.text
MsgBox CDbl(1234.5678) ' 1234.5678

Loading…

No matching activity found.
Browse all component changes

Glossary

English Estonian
No related strings found in the glossary.

String information

Context
03100700.xhp
bas_id911593692598060
help.text
Source string description
7HRGK
Source string location
03100700.xhp
String age
2 years ago
Source string age
2 years ago
Translation file
et/helpcontent2/source/text/sbasic/shared.po, string 2795