source: trunk/SRC/Documentation/idldoc_html_output/ToBeReviewed/LECTURE/binary.html @ 402

Last change on this file since 402 was 402, checked in by smasson, 15 years ago

update documentation

File size: 5.2 KB
Line 
1
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5<!-- Generated by IDLdoc 2.0 -->
6
7<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
8  <head>
9    <title>binary.pro (SAXO Documentation)</title>
10
11   
12    <link rel="stylesheet" type="text/css" media="all" href="./../../main_files.css" />
13    <link rel="stylesheet" type="text/css" media="print" href="./../../main_files_print.css" />
14   
15
16    <script type="text/javascript">
17      function setTitle() {
18        parent.document.title="binary.pro (SAXO Documentation)";
19      }
20    </script>
21  </head>
22
23  <body onload="setTitle();">
24
25    <div id="navbar_title">
26  <h1>SAXO Documentation</h1>
27</div>
28
29
30<div id="main_navbar">
31
32  <table cellspacing="0">
33    <tr>
34     
35      <td><a href="./../../overview.html" title="Overview of library">Overview</a></td>
36     
37
38     
39      <td >Directory</td>
40     
41
42     
43      <td><a href="./../../idldoc-categories.html" title="Browse library by category">Categories</a></td>
44     
45
46     
47      <td><a href="./../../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td>
48     
49
50     
51      <td><a href="./../../search-page.html" title="Search library">Search</a></td>
52     
53
54      <td id="selected">File</td>
55
56     
57      <td><a href="../../../../ToBeReviewed/LECTURE//binary.pro" title="Source code of a file">Source</a></td>
58     
59
60     
61      <td><a href="./../../idldoc-help.html" title="Help on IDLdoc">Help</a></td>
62     
63
64      <td >Etc</td>
65
66      <td id="flexible">Developer&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
74&lt;&lt; prev file | <a href="changeread.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="binary.html" target="_TOP">view single page</a> | <a href="./../../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a>
75
76</div>
77
78
79    <div id="container">
80
81      <h1 class="directory"><a href="directory-overview.html">ToBeReviewed/LECTURE/</a></h1>
82      <h2 class="pro_file">binary.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments">
90 Returns the binary representation of a number of any numerical type.
91</div>
92
93     
94
95     
96
97     
98
99     
100
101      <div id="routine_details">
102       
103
104        <div class="routine_details" id="_binary">
105
106          <h2><a class="top" href="#container">top</a>binary </h2>
107       
108          <p class="header">
109            <span class="result">result = </span>binary(<span class="result"><a href="#_binary_param_number">number</a></span>)</p>
110       
111          <div class="comments">
112</div>
113
114          <h3>Return value</h3><div class="preformat">
115 Byte array with binary representation of numbers.
116</div>
117
118         
119            <h3>Parameters</h3>
120       
121           
122            <h4 id="_binary_param_number">number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
123              <span class="attr">in</span>
124             
125             
126              <span class="attr">required</span>
127             
128             
129             
130             
131            </h4>
132       
133          <div class="comments">
134 scalar or array of numbers (any numerical type)
135</div>
136           
137
138         
139
140         
141
142          <h3>Examples</h3><div class="preformat">
143
144   Binary representation of 11b:
145   IDL> print, binary(11b)
146     0 0 0 0 1 0 1 1
147
148   Binary representation of pi (x86: Little-endian IEEE representation):
149   IDL> print, format='(z9.8,5x,4(1x,8i1))', long(!pi,0), binary(!pi)
150      40490fdb      01000000 01001001 00001111 11011011 (x86 Linux)
151      0fdb4149      00001111 11011011 01000001 01001001 (Alpha OpenVMS)
152   IDL> print, format='(8(1x,8i0))', binary(!dpi)
153      01000000 00001001 00100001 11111011 01010100 01000100 00101101 00011000
154
155   Some first tests before type double was added:
156   IDL> print, format='(2a6,4x,2z9.8,4x,8z3.2)', $
157       !version.arch, !version.os, long(!dpi,0,2), byte(!dpi,0,8)
158       x86 linux     54442d18 400921fb     18 2d 44 54 fb 21 09 40
159     sparc sunos     400921fb 54442d18     40 09 21 fb 54 44 2d 18
160     alpha   vms     0fda4149 68c0a221     49 41 da 0f 21 a2 c0 68
161     (Beginning with IDL 5.1, Alpha VMS uses IEEE representation as well.)
162</div>
163          <h3>Version history</h3>
164         
165          <h4>Version</h4><div class="preformat">
166 $Id: binary.pro 371 2008-08-07 09:32:02Z pinsard $
167</div>
168          <h4>History</h4><div class="preformat">
169    19 Dec 1997  Originally a news posting by David Fanning.
170                       (Re: bits from bytes)
171    20 Dec 1997  "Complete" rewrite: eliminate loops.
172    22 Dec 1997  Bit shift instead of exponentiation, return byte
173      array, handle input arrays.
174      Think about double and complex types.
175    22 Sep 1998  Complete rewrite: reduce every numerical type to
176      single bytes. Check that big and little endian machines
177      return exactly the same results (if IEEE).
178    7 May 2003     Added newish data types, unsigned and long64.  BT
179</div>
180         
181         
182         
183         
184         
185         
186         
187       
188         
189         
190         
191         
192         
193         
194         
195       
196          <h3>Statistics</h3>
197          <table class="statistics">
198            <tr><td>McCabe cyclic</td><td>           4</td></tr>
199            <tr><td>McCabe essential</td><td>           1</td></tr>
200            <tr><td>McCabe modular design</td><td>           1</td></tr>
201          </table>
202         
203       
204        </div>
205       
206      </div>
207
208     
209
210      <div id="tagline">Produced by IDLdoc 2.0.</div>
211
212    </div>
213
214  </body>
215</html>
Note: See TracBrowser for help on using the repository browser.