/usr/share/doc/dpuser-doc/procedure_compile.html is in dpuser-doc 3.3+p1+dfsg-2build1.
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 | <html>
<head>
<meta name="Author" content="Thomas Ott">
<title>DPUSER - The Next Generation: Procedure compile</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 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 class="declaration">procedure compile</h1>
<p>
Converts a dpuser-script into C-code, compiles it and links it at runtime into the running dpuser-session. Unlike with user defined functions or procedures, it is not allowed to compile a function with the same name as aalready compiled procedure and vice versa.
<br><br><b><font size=+2>Syntax</font></b><br>
compile "filename"
<br><br><b><font size=+2>Arguments</font></b><br>
<table CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
<tr VALIGN=TOP><td nowrap>filename: </td>
<td> The filename of the dpuser-script to convert</td></tr>
</table>
<br><br><b><font size=+2>Switches</font></b><br>
<table CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
<tr VALIGN=TOP><td nowrap>/c: </td>
<td> Adds needed headers and forward declarations to existing C-code and links it on runtime. The general data type to use must be 'dpuserType'. Functions and procedures must begin like shown in the examples below.</td></tr>
<tr VALIGN=TOP><td nowrap>/reset: </td>
<td> Unloads all compiled functions and procedures. See example below.</td></tr>
</table>
<br><br><b><font size=+2>Examples</font></b><br>
To compile c-code, functions must be defined as follows:
<br><tt> extern "C" dpuserType funcName(dpuserType &a, ...) { ... }</tt>
<br><tt> ...;</tt>
<br><tt> return funcName;</tt>
<br><tt> }</tt>
<br>Procedures must be defined as follows:
<br><tt> extern "C" void procName(dpuserType &a, ...) {</tt>
<br><tt> ...;</tt>
<br><tt> return;</tt>
<br><tt> }</tt>
<br>To unload all functions and procedures:
<br><tt> compile "", /reset</tt>
</div>
<div id="copyright">
Copyright © Thomas Ott ---- DPUSER - The Next Generation 3.3 (Rev. )
</div>
</body>
</html>
|