/usr/share/doc/dpuser-doc/variables.html is in dpuser-doc 3.3+p1+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 91 | <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Thomas Ott">
<title>DPUSER - The Next Generation: Data types and variables</title>
<style type="text/css" title="currentStyle">
@import "dpuser.css";
</style>
<link rel="shortcut icon" href="dpuser.ico" type="image/xicon">
</head>
<body>
<div id="header">DPUSER - The Next Generation</div>
<div id="menu">
<ul>
<li><a href="index.html">Introduction</a></li>
<li><a href="history.html">History</a></li>
<li><a href="syntax.html">Syntax</a></li>
<li><a href="operators.html">Operators</a></li>
<li><a href="ifandloop.html">Structural commands</a></li>
<li><a class="current" href="variables.html">Data types</a></li>
<li><a href="plotting.html">Graphics</a></li>
<li><a href="fitsfiles.html">Fits files</a></li>
<li><a href="category.html">Category index</a></li>
<li><a href="functions.html">Function index</a></li>
<li><a href="procedures.html">Procedure index</a></li>
<li><a href="pgplot.html">Pgplot index</a></li>
<li><a href="examples.html">Examples</a></li>
<hr>
<li><a href="qfitsview.html">QFitsView documentation</a></li>
<hr>
</ul>
<form method="GET" action="search.html">
<input type="text" size=15 name="keywords">
<input type="submit" value="Search">
</form>
</div>
<div id="content">
<h1>Data types and variables</h1>
DPUSER knows about 6 different data types:
<ul>
<li>
integer numbers</li>
<li>
real numbers</li>
<li>
complex numbers</li>
<li>
up to 3-dimensional matrices</li>
<li>
strings</li>
<li>
string arrays</li>
</ul>
Those types are cast dynamically. So if you do a <tt>print acos(2)</tt>,
the result will not be integer (which would not make sense), but a complex
number. Complex numbers can be constructed by appending an <tt>i</tt> (without
spaces) to a number:
<blockquote><tt>variable = 1 + 2i</tt></blockquote>
Strings are defined by embracing in double quotes:
<blockquote><tt>variable = "This is a string"</tt>.</blockquote>
Variable names can include any letter in the range [a-zA-Z] and numbers
[0-9] but must not begin with a number. Variables are created on the fly
by assigning a value to them. If you supply a value to an already existing
variable, it is overwritten:
<blockquote><tt>n = 1
// n is an integer number</tt>
<br><tt>n++
// n is still integer with value 2</tt>
<br><tt>n = sqrt(n)
// n now is a real number</tt>
<br><tt>n = -(n^2)
// n is still a real number with value -2.0</tt>
<br><tt>n = n^(1/2)
// n now is a complex number</tt>
<br><tt>n = "a string"
// n is a string with value "a string"</tt>
<br><tt>n = fits(100, 100) //
n is now a matrix with 100x100 elements</tt></blockquote>
</div>
<div id="copyright">
Copyright © Thomas Ott ---- DPUSER - The Next Generation 3.3 (Rev. )
</div>
</body>
</html>
|