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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
<!DOCTYPE html>
<html lang="en" dir="ltr" class="no-js">
<head>
<meta charset="utf-8" />
<title>en:numericconstants [BASIC 256 - Language Documentation]</title>
<link rel="stylesheet" type="text/css" href="lib/exe/cssc171c1dfe8519125bb40a349172b001a.css"/>
</head>
<body>
<div id="dokuwiki__site"><div id="dokuwiki__top" class="site dokuwiki mode_show tpl_dokuwiki ">
<div id="dokuwiki__header"><div class="pad group">
<div class="headings group">
<h1><a href="start.html" accesskey="h" title="[H]"><img src="lib/tpl/dokuwiki/images/logo.png" width="64" height="64" alt="" /> <span>BASIC 256 - Language Documentation</span></a></h1>
</div>
</div>
<div class="breadcrumbs">
<div class="youarehere"><span class="bchead">You are here: </span><span class="home"><bdi><a href="start.html" class="wikilink1" title="start">start</a></bdi></span> » <bdi><a href="en_start.html" class="wikilink1" title="en:start">en</a></bdi> » <bdi><span class="curid"><a href="en_numericconstants.html" class="wikilink1" title="en:numericconstants">numericconstants</a></span></bdi></div>
</div>
<hr class="a11y" />
</div></div>
<div class="wrapper group">
<div id="dokuwiki__content"><div class="pad group">
<div class="pageId"><span>en:numericconstants</span></div>
<div class="page group">
<h2 class="sectionedit1" id="numeric_constants">Numeric Constants</h2>
<div class="level2">
<p>
Numeric constants are any numeric characters, preceded by an optional minus sign to indicate negative numbers, and an optional decimal followed by more numeric characters to indicate floating point values. Examples of decimal numbers includes:
</p>
<div class="table sectionedit2"><table class="inline">
<tr class="row0">
<th class="col0">Decimal Numbers</th>
</tr>
<tr class="row1">
<td class="col0">10</td>
</tr>
<tr class="row2">
<td class="col0">-234.567</td>
</tr>
<tr class="row3">
<td class="col0">56.87</td>
</tr>
<tr class="row4">
<td class="col0">0.0123</td>
</tr>
</table></div>
<p>
Very large and small numbers may also be represented in scientific E notation (added in version 0.9.9.46). <a href="http://en.wikipedia.org/wiki/Scientific_notation" class="urlextern" title="http://en.wikipedia.org/wiki/Scientific_notation" rel="nofollow">http://en.wikipedia.org/wiki/Scientific_notation</a>
</p>
<div class="table sectionedit3"><table class="inline">
<tr class="row0">
<th class="col0" colspan="2">Scientific E Notation</th>
</tr>
<tr class="row1">
<th class="col0">E Notation</th><th class="col1">Decimal Number</th>
</tr>
<tr class="row2">
<td class="col0">2e0</td><td class="col1">2</td>
</tr>
<tr class="row3">
<td class="col0">3e2</td><td class="col1">300</td>
</tr>
<tr class="row4">
<td class="col0">1.234e10</td><td class="col1">12340000000</td>
</tr>
<tr class="row5">
<td class="col0">-5.3e4</td><td class="col1">-53000</td>
</tr>
<tr class="row6">
<td class="col0">2e-1</td><td class="col1">0.2</td>
</tr>
<tr class="row7">
<td class="col0">5.12e-9</td><td class="col1">0.00000000512</td>
</tr>
</table></div>
<p>
Positive integer values may also be expressed in binary (base 2), octal (base 8), and hexadecimal (base 16). Precede binary values with 0b (0b1110 = 14), octal with 0o (0o177 = 127), and hexadecimal with 0x (0xff = 255).
</p>
</div>
</div>
<div class="docInfo"><bdi>en/numericconstants.txt</bdi> · Last modified: 2013/02/09 21:41 by <bdi>admin</bdi></div>
</div></div>
<hr class="a11y" />
</div>
<div id="dokuwiki__footer"><div class="pad">
<div class="license">Except where otherwise noted, content on this wiki is licensed under the following license: <bdi><a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license" class="urlextern">CC Attribution-Share Alike 3.0 Unported</a></bdi></div>
</div></div>
</div></div>
<div id="screen__mode" class="no"></div>
</body>
</html>
|