-
Notifications
You must be signed in to change notification settings - Fork 8
/
hbmisc.html
550 lines (523 loc) · 52 KB
/
hbmisc.html
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="referrer" content="origin">
<meta name="viewport" content="initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests; block-all-mixed-content">
<meta name="generator" content="hbdoc">
<meta name="keywords" content="Harbour, Clipper, xBase, database, Free Software, GPL, compiler, cross-platform, 32-bit, 64-bit">
<title>Harbour Reference Guide · hbmisc lib</title>
<style>
/**
* Minified by jsDelivr using clean-css v4.2.1.
* Original file: /gh/PrismJS/[email protected]/themes/prism-okaidia.css
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a6e22e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#e6db74}.token.keyword{color:#66d9ef}.token.important,.token.regex{color:#fd971f}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}
/*# sourceMappingURL=/sm/40fbac8c090a0ea2949bef662c4dc8f61e9fdf4136e4615ec312d47b6c8d4578.map */
</style>
<link rel="stylesheet" href="hbdoc.css">
<body>
<header>
<svg viewBox="0 0 2260 2260" xmlns="http://www.w3.org/2000/svg">
<path d="m900 1908c137.17-53.265 443.4-77.006 600-52.437-27.114-474.75-34.113-758.18-7.68-1116.3 2.056-27.195 4.283-54.9 6.68-83.245-34.633 68.628-579.45 1206.4-599 1252z"/>
<path d="m1503 297c-123.84 327.12-161.3 844.46-213.46 1389.5-169.5-13.113-449.01 19.795-659.3 108.82 13.528-23.75 771.23-1330.1 872.77-1498.3z"/>
<path d="m1172 1270c-224.3-65.046-473.09 64.996-694 204 153.35-235.43 613.25-936.89 1011-1474-301.51 419.86-317.18 1087.9-317 1270z"/>
<path d="m620.8 2258.7c0.662-1.037 1.36-2.165 2.068-3.191 36.736-55.29 105.69-101.18 205.1-96.72 193.8 8.619 357.24 25.577 652.18 7.207-290.1-9.342-643.35-48.142-1069.1-124.55 105.83 77.98 193.83 195.4 209.76 217.25"/>
<path d="m2259.2 2007.9c-351.83 85.376-1111.3 54.312-2014.2-105.24 59.534 32.024 105.24 68.44 160.57 113.87 884.55 158.71 1465.7 153.54 1808.7 60.37 31.307-22.43 35.385-37.956 44.934-69.006"/>
<path d="m2250.8 1985.6c-316.53 76.867-976 46.6-1793.5-72.332-79.588-11.605-308.23-46.57-445.63-69.063-7.464-15.506-11.282-40.462-11.282-70.79 509.45 68.675 1799.6 275.42 2244 168.26 2.015 12.02 7.115 18.487 6.527 43.929"/>
</svg>
<div>
<div><a href="index.html">Harbour Reference Guide</a></div>
<div>
<nav class="menu">
<nav class="dropdown">
<span class="dropbtn" onclick="">hbmisc lib</span>
<nav class="dropdown-content">
<a href="harbour.html">Harbour core</a>
<hr>
<a href="clc53.html">Clipper 5.3</a>
<a href="clct3.html">Clipper Tools 3</a>
<hr>
<a href="gtwvw.html">gtwvw</a>
<a href="hbct.html">hbct</a>
<a href="hbcups.html">hbcups</a>
<a href="hbgd.html">hbgd</a>
<a href="hbgt.html">hbgt</a>
<a href="hbmisc.html">hbmisc</a>
<a href="hbnf.html">hbnf</a>
<a href="hbxpp.html">hbxpp</a>
<a href="hbziparc.html">hbziparc</a>
<a href="rddads.html">rddads</a>
</nav>
</nav>
<nav class="dropdown lang">
<span class="dropbtn lang">EN</span><nav class="dropdown-content lang">
<a href="hbmisc.html">EN</a>
<a href="pt-br/index.html">pt-BR</a>
</nav>
</nav>
</nav>
</div>
</div>
</header>
<aside>
<a href="#adays" title="ADays()"><code>ADays()</code></a>
<a href="#amonths" title="AMonths()"><code>AMonths()</code></a>
<a href="#bintodec" title="BinToDec()"><code>BinToDec()</code></a>
<a href="#dectobin" title="DecToBin()"><code>DecToBin()</code></a>
<a href="#dectohexa" title="DecToHexa()"><code>DecToHexa()</code></a>
<a href="#dectooctal" title="DecToOctal()"><code>DecToOctal()</code></a>
<a href="#hbmisc_daysinmonth" title="hbmisc_DaysInMonth()"><code>hbmisc_DaysInMonth()</code></a>
<a href="#hexatodec" title="HexaToDec()"><code>HexaToDec()</code></a>
<a href="#isbin" title="IsBin()"><code>IsBin()</code></a>
<a href="#isdec" title="IsDec()"><code>IsDec()</code></a>
<a href="#ishexa" title="IsHexa()"><code>IsHexa()</code></a>
<a href="#isleapyear" title="IsLeapYear()"><code>IsLeapYear()</code></a>
<a href="#isoctal" title="IsOctal()"><code>IsOctal()</code></a>
<a href="#octaltodec" title="OctalToDec()"><code>OctalToDec()</code></a>
<a href="#tfileread" title="TFileRead()"><code>TFileRead()</code></a>
<a href="#woy" title="WoY()"><code>WoY()</code></a>
</aside>
<main>
<section>
<h4><a href="#bintodec" class="d-id" id="bintodec" title="∞"><code>BinToDec()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/nconvert.prg#L138" class="d-so" title="contrib/hbmisc/nconvert.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=BinToDec">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+BinToDec">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/nconvert.txt">Improve this doc</a></span></h4>
<div class="d-ol">Converts a binary value to decimal</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>BinToDec( <cN> ) → cNr</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cN</code> Number to be converted</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>cNr</code> Number converted</div>
<div class="d-d">Description</div>
<div class="d-it">This function converts a string <code>cN</code> from an binary value to a numeric decimal value.</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Conversion Tools</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#hexatodec">HexaToDec()</a></code>, <code><a href="#octaltodec">OctalToDec()</a></code></div>
</section>
<section>
<h4><a href="#dectobin" class="d-id" id="dectobin" title="∞"><code>DecToBin()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/nconvert.prg#L99" class="d-so" title="contrib/hbmisc/nconvert.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=DecToBin">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+DecToBin">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/nconvert.txt">Improve this doc</a></span></h4>
<div class="d-ol">Converts a decimal value to binary</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>DecToBin( <cN> ) → cNr</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cN</code> Number to be converted</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>cNr</code> Number converted</div>
<div class="d-d">Description</div>
<div class="d-it">This function converts a string <code>cN</code> from an decimal value to an binary value.</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Conversion Tools</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#dectohexa">DecToHexa()</a></code>, <code><a href="#dectooctal">DecToOctal()</a></code></div>
</section>
<section>
<h4><a href="#dectohexa" class="d-id" id="dectohexa" title="∞"><code>DecToHexa()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/nconvert.prg#L125" class="d-so" title="contrib/hbmisc/nconvert.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=DecToHexa">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+DecToHexa">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/nconvert.txt">Improve this doc</a></span></h4>
<div class="d-ol">Converts a decimal value to hexadecimal</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>DecToHexa( <cN> ) → cNr</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cN</code> Number to be converted</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>cNr</code> Number converted</div>
<div class="d-d">Description</div>
<div class="d-it">This function converts a string <code>cN</code> from an decimal value to an hexadecimal value.</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Conversion Tools</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#dectobin">DecToBin()</a></code>, <code><a href="#dectooctal">DecToOctal()</a></code></div>
</section>
<section>
<h4><a href="#dectooctal" class="d-id" id="dectooctal" title="∞"><code>DecToOctal()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/nconvert.prg#L112" class="d-so" title="contrib/hbmisc/nconvert.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=DecToOctal">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+DecToOctal">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/nconvert.txt">Improve this doc</a></span></h4>
<div class="d-ol">Converts a decimal value to octal</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>DecToOctal( <cN> ) → cNr</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cN</code> Number to be converted</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>cNr</code> Number converted</div>
<div class="d-d">Description</div>
<div class="d-it">This function converts a string <code>cN</code> from an decimal value to an octal value.</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Conversion Tools</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#dectobin">DecToBin()</a></code>, <code><a href="#dectohexa">DecToHexa()</a></code></div>
</section>
<section>
<h4><a href="#hexatodec" class="d-id" id="hexatodec" title="∞"><code>HexaToDec()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/nconvert.prg#L162" class="d-so" title="contrib/hbmisc/nconvert.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=HexaToDec">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+HexaToDec">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/nconvert.txt">Improve this doc</a></span></h4>
<div class="d-ol">Converts a hexadecimal value to decimal</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>HexaToDec( <cN> ) → cNr</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cN</code> Number to be converted</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>cNr</code> Number converted</div>
<div class="d-d">Description</div>
<div class="d-it">This function converts a string <code>cN</code> from an hexadecimal value to a numeric decimal value.</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Conversion Tools</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#bintodec">BinToDec()</a></code>, <code><a href="#octaltodec">OctalToDec()</a></code></div>
</section>
<section>
<h4><a href="#isbin" class="d-id" id="isbin" title="∞"><code>IsBin()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/nconvert.prg#L47" class="d-so" title="contrib/hbmisc/nconvert.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=IsBin">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+IsBin">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/nconvert.txt">Improve this doc</a></span></h4>
<div class="d-ol">Check if the value is a binary number</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>IsBin( <cN> ) → cNr</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cN</code> String to be checked</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>cNr</code> <code>.T.</code> if the string is binary, otherwise <code>.F.</code></div>
<div class="d-d">Description</div>
<div class="d-it">check if the passed string is a binary number or not</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Conversion Tools</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#isdec">IsDec()</a></code>, <code><a href="#ishexa">IsHexa()</a></code>, <code><a href="#isoctal">IsOctal()</a></code></div>
</section>
<section>
<h4><a href="#isdec" class="d-id" id="isdec" title="∞"><code>IsDec()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/nconvert.prg#L73" class="d-so" title="contrib/hbmisc/nconvert.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=IsDec">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+IsDec">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/nconvert.txt">Improve this doc</a></span></h4>
<div class="d-ol">Check if the value is a Decimal Number</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>IsDec( <cN> ) → cNr</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cN</code> String to be checked</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>cNr</code> <code>.T.</code> if the string is decimal; otherwise <code>.F.</code></div>
<div class="d-d">Description</div>
<div class="d-it">check if the passed string is a decimal number or not</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Conversion Tools</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#isbin">IsBin()</a></code>, <code><a href="#ishexa">IsHexa()</a></code>, <code><a href="#isoctal">IsOctal()</a></code></div>
</section>
<section>
<h4><a href="#ishexa" class="d-id" id="ishexa" title="∞"><code>IsHexa()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/nconvert.prg#L86" class="d-so" title="contrib/hbmisc/nconvert.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=IsHexa">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+IsHexa">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/nconvert.txt">Improve this doc</a></span></h4>
<div class="d-ol">Check if the value is a hexadecimal number</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>IsHexa( <cN> ) → cNr</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cN</code> String to be checked</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>cNr</code> <code>.T.</code> if the string is hexadecimal; otherwise <code>.F.</code></div>
<div class="d-d">Description</div>
<div class="d-it">check if the passed string is a hexadecimal number or not</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Conversion Tools</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#isbin">IsBin()</a></code>, <code><a href="#isdec">IsDec()</a></code>, <code><a href="#isoctal">IsOctal()</a></code></div>
</section>
<section>
<h4><a href="#isoctal" class="d-id" id="isoctal" title="∞"><code>IsOctal()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/nconvert.prg#L60" class="d-so" title="contrib/hbmisc/nconvert.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=IsOctal">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+IsOctal">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/nconvert.txt">Improve this doc</a></span></h4>
<div class="d-ol">Check if the value is a octal number</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>IsOctal( <cN> ) → cNr</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cN</code> String to be checked</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>cNr</code> <code>.T.</code> if the string is octal; otherwise <code>.F.</code></div>
<div class="d-d">Description</div>
<div class="d-it">check if the passed string is a octal number or not</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Conversion Tools</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#isbin">IsBin()</a></code>, <code><a href="#isdec">IsDec()</a></code>, <code><a href="#ishexa">IsHexa()</a></code></div>
</section>
<section>
<h4><a href="#octaltodec" class="d-id" id="octaltodec" title="∞"><code>OctalToDec()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/nconvert.prg#L150" class="d-so" title="contrib/hbmisc/nconvert.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=OctalToDec">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+OctalToDec">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/nconvert.txt">Improve this doc</a></span></h4>
<div class="d-ol">Converts a octal value to decimal</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>OctalToDec( <cN> ) → cNr</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cN</code> Number to be converted</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>cNr</code> Number converted</div>
<div class="d-d">Description</div>
<div class="d-it">This function converts a string <code>cN</code> from an octal value to a numeric decimal value.</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Conversion Tools</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#bintodec">BinToDec()</a></code>, <code><a href="#hexatodec">HexaToDec()</a></code></div>
</section>
<section>
<h4><a href="#adays" class="d-id" id="adays" title="∞"><code>ADays()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/dates.c#L115" class="d-so" title="contrib/hbmisc/dates.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=ADays">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+ADays">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/dates.txt">Improve this doc</a></span></h4>
<div class="d-ol">Returns an array with the days names.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>ADays() → aDays</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it">None</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>aDays</code> The array which holds the days names.</div>
<div class="d-d">Description</div>
<div class="d-it">This function returns an array with all the days names in the selected current language.</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL aDays := ADays()
? aDays[ 1 ] // --> Sunday
? aDays[ 1 ] // --> Domingo (if the selected language is Spanish)
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Date</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#adays">ADays()</a></code></div>
</section>
<section>
<h4><a href="#amonths" class="d-id" id="amonths" title="∞"><code>AMonths()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/dates.c#L104" class="d-so" title="contrib/hbmisc/dates.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=AMonths">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+AMonths">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/dates.txt">Improve this doc</a></span></h4>
<div class="d-ol">Returns an array with the months names.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>AMonths() → aMonths</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it">None</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>aMonths</code> The array which holds the months names.</div>
<div class="d-d">Description</div>
<div class="d-it">This function returns an array with all the months names in the selected current language.</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL aMonths := AMonths()
? aMonths[ 1 ] // --> January
? aMonths[ 1 ] // --> Enero (if the selected language is Spanish)
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Date</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#adays">ADays()</a></code></div>
</section>
<section>
<h4><a href="#hbmisc_daysinmonth" class="d-id" id="hbmisc_daysinmonth" title="∞"><code>hbmisc_DaysInMonth()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/dates.c#L141" class="d-so" title="contrib/hbmisc/dates.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=hbmisc_DaysInMonth">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+hbmisc_DaysInMonth">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/dates.txt">Improve this doc</a></span></h4>
<div class="d-ol">Gets the days in a month.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>hbmisc_DaysInMonth( <dDate> ) → nDays</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>dDate</code> A valid date.</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>nDays</code> The number of days of the month.</div>
<div class="d-d">Description</div>
<div class="d-it">This function returns the number of days of the given date month.</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">? hbmisc_DaysInMonth( 0d20000101 ) // --> 31
? hbmisc_DaysInMonth( 0d20000201 ) // --> 29
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Date</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#isleapyear">IsLeapYear()</a></code></div>
</section>
<section>
<h4><a href="#isleapyear" class="d-id" id="isleapyear" title="∞"><code>IsLeapYear()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/dates.c#L126" class="d-so" title="contrib/hbmisc/dates.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=IsLeapYear">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+IsLeapYear">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/dates.txt">Improve this doc</a></span></h4>
<div class="d-ol">Checks if the given date is a leap year.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>IsLeapYear( <dDate> ) → lTrueOrFalse</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>dDate</code> A valid date.</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>lTrueOrFalse</code> A logical that indicates if the date year is leap</div>
<div class="d-d">Description</div>
<div class="d-it">This function returns true if the given date is a leap year and false if isn't.</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">? IsLeapYear( 0d20000101 ) // --> .T.
? IsLeapYear( 0d20010101 ) // --> .F.
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Date</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#hbmisc_daysinmonth">hbmisc_DaysInMonth()</a></code></div>
</section>
<section>
<h4><a href="#woy" class="d-id" id="woy" title="∞"><code>WoY()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/dates.c#L156" class="d-so" title="contrib/hbmisc/dates.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=WoY">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+WoY">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/dates.txt">Improve this doc</a></span></h4>
<div class="d-ol">Gets the week number of the year.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>WoY( <dDate>, <lIso> ) → nWeek</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>dDate</code> A valid date.</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>nWeek</code> The week number <code>lIso</code> Flag that indicates if <code>nWeek</code> is in ISO format.</div>
<div class="d-d">Description</div>
<div class="d-it">This function returns the week number of the year for a given date. It returns the week number in ISO format (range 0 - 52, by default or passing TRUE as second parameter) or 1 - 52 if <code>lIso</code> is FALSE.</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">? WoY( 0d20000131 ) // --> 3
? WoY( 0d20000131, .F. ) // --> 4
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">Date</div>
<div class="d-d">See also</div>
<div class="d-it"><nav class="dropdown"><code><a href="hbct.html#doy" title="hbct">DoY()</a></code><nav class="dropdown-content d-dd"><a href="clct3.html#doy">Clipper Tools 3</a></nav></nav></div>
</section>
<section>
<h4><a href="#tfileread" class="d-id" id="tfileread" title="∞"><code>TFileRead()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbmisc/fileread.prg#L17" class="d-so" title="contrib/hbmisc/fileread.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=TFileRead">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+TFileRead">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbmisc/doc/en/fileread.txt">Improve this doc</a></span></h4>
<div class="d-ol">Read a file one line at a time</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>oFile := TFileRead():New( <cFileName> [, <nReadSize> ] )</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it">
<div><code>cFileName</code> is the required name of the file to be read.</div>
<div><code>nReadSize</code> is the optional size to use when reading from the file. The default value is 4096 and the allowed range is 1 through 65535. Any value outside of this range causes the default value to be used.</div>
</div>
<div class="d-d">Returns</div>
<div class="d-it">An instance of the File Reader class</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>TFileRead()</code> is used to access a file one line at a time. You must specify the name of the file when an instance of the class is created.</div>
<div><p>The class data should be considered private to the class.</div>
<div><p>The class methods are as follows:</div>
<div><p><code>:New()</code> Creates a new instance of the <code>TFileRead()</code> class.</div>
<div><p><code>:Open( [<nFlags>] )</code> Opens the file for reading. The optional <code>nFlags</code></div>
<div><p>parameter can use any of the file open flags from <code><a href="https://github.com/vszakats/hb/blob/096e855/include/fileio.ch">fileio.ch</a></code>. The default is <code>FO_READ + FO_SHARED</code>. Calling this method when the file is already open causes the next <code>:ReadLine()</code> to start over from the beginning of the file.</div>
<div><p><code>:Close()</code> Closes the file.</div>
<div><p><code>:ReadLine()</code> Returns one line from the file, stripping the</div>
<div><p>newline characters. The following sequences are treated as one newline: 1) <code>CR CR LF</code>; 2) <code>CR LF</code>; 3) LF; and 4) CR. Note: <code>LF CR</code> is 2 newlines.</div>
<div><p><code>:Name()</code> Returns the name of the file.</div>
<div><p><code>:IsOpen()</code> Returns <code>.T.</code> if the file is open.</div>
<div><p><code>:MoreToRead()</code> Returns <code>.T.</code> if there are more lines to be read</div>
<div><p>(think of it as an inverse EOF function).</div>
<div><p><code>:Error()</code> Returns <code>.T.</code> if an error has occurred.</div>
<div><p><code>:ErrorNo()</code> Returns the current error code.</div>
<div><p><code>:ErrorMsg( [<cPre>] )</code> Returns a formatted error message.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL oFile := TFileRead():New( "test.txt" )
oFile:Open()
IF oFile:Error()
? oFile:ErrorMsg( "FileRead:" )
ELSE
DO WHILE oFile:MoreToRead()
? oFile:ReadLine()
ENDDO
oFile:Close()
ENDIF
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbmisc</div>
<div class="d-d">Tag</div>
<div class="d-it">File</div>
</section>
</main>
<footer>
<div>Generated by hbdoc on 2020-10-15 00:54 UTC</div>
<div>Based on revision <a href="https://github.com/vszakats/hb/tree/096e855">096e855</a></div>
<div>Content processing, layout & design © 2020 <a href="https://vsz.me/hb">vszakats</a></div>
</footer>
<script>
/**
* Minified by jsDelivr using Terser v3.14.1.
* Original file: /gh/PrismJS/[email protected]/prism.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var t=/\blang(?:uage)?-([\w-]+)\b/i,a=0,n={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):Array.isArray(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++a}),e.__id},clone:function e(t,a){var r,s,i=n.util.type(t);switch(a=a||{},i){case"Object":if(s=n.util.objId(t),a[s])return a[s];for(var l in r={},a[s]=r,t)t.hasOwnProperty(l)&&(r[l]=e(t[l],a));return r;case"Array":return s=n.util.objId(t),a[s]?a[s]:(r=[],a[s]=r,t.forEach(function(t,n){r[n]=e(t,a)}),r);default:return t}}},languages:{extend:function(e,t){var a=n.util.clone(n.languages[e]);for(var r in t)a[r]=t[r];return a},insertBefore:function(e,t,a,r){var s=(r=r||n.languages)[e],i={};for(var l in s)if(s.hasOwnProperty(l)){if(l==t)for(var o in a)a.hasOwnProperty(o)&&(i[o]=a[o]);a.hasOwnProperty(l)||(i[l]=s[l])}var u=r[e];return r[e]=i,n.languages.DFS(n.languages,function(t,a){a===u&&t!=e&&(this[t]=i)}),i},DFS:function e(t,a,r,s){s=s||{};var i=n.util.objId;for(var l in t)if(t.hasOwnProperty(l)){a.call(t,l,t[l],r||l);var o=t[l],u=n.util.type(o);"Object"!==u||s[i(o)]?"Array"!==u||s[i(o)]||(s[i(o)]=!0,e(o,a,l,s)):(s[i(o)]=!0,e(o,a,null,s))}}},plugins:{},highlightAll:function(e,t){n.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,a){var r={callback:a,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",r);for(var s,i=e.querySelectorAll(r.selector),l=0;s=i[l++];)n.highlightElement(s,!0===t,r.callback)},highlightElement:function(a,r,s){for(var i,l="none",o=a;o&&!t.test(o.className);)o=o.parentNode;o&&(l=(o.className.match(t)||[,"none"])[1].toLowerCase(),i=n.languages[l]),a.className=a.className.replace(t,"").replace(/\s+/g," ")+" language-"+l,a.parentNode&&(o=a.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(t,"").replace(/\s+/g," ")+" language-"+l));var u={element:a,language:l,grammar:i,code:a.textContent},c=function(e){u.highlightedCode=e,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,n.hooks.run("after-highlight",u),n.hooks.run("complete",u),s&&s.call(u.element)};if(n.hooks.run("before-sanity-check",u),u.code)if(n.hooks.run("before-highlight",u),u.grammar)if(r&&e.Worker){var g=new Worker(n.filename);g.onmessage=function(e){c(e.data)},g.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else c(n.highlight(u.code,u.grammar,u.language));else c(n.util.encode(u.code));else n.hooks.run("complete",u)},highlight:function(e,t,a){var s={code:e,grammar:t,language:a};return n.hooks.run("before-tokenize",s),s.tokens=n.tokenize(s.code,s.grammar),n.hooks.run("after-tokenize",s),r.stringify(n.util.encode(s.tokens),s.language)},matchGrammar:function(e,t,a,s,i,l,o){for(var u in a)if(a.hasOwnProperty(u)&&a[u]){if(u==o)return;var c=a[u];c="Array"===n.util.type(c)?c:[c];for(var g=0;g<c.length;++g){var d=c[g],p=d.inside,m=!!d.lookbehind,f=!!d.greedy,h=0,b=d.alias;if(f&&!d.pattern.global){var y=d.pattern.toString().match(/[imuy]*$/)[0];d.pattern=RegExp(d.pattern.source,y+"g")}d=d.pattern||d;for(var F=s,v=i;F<t.length;v+=t[F].length,++F){var k=t[F];if(t.length>e.length)return;if(!(k instanceof r)){if(f&&F!=t.length-1){if(d.lastIndex=v,!(S=d.exec(e)))break;for(var w=S.index+(m?S[1].length:0),A=S.index+S[0].length,x=F,P=v,$=t.length;x<$&&(P<A||!t[x].type&&!t[x-1].greedy);++x)w>=(P+=t[x].length)&&(++F,v=P);if(t[F]instanceof r)continue;_=x-F,k=e.slice(v,P),S.index-=v}else{d.lastIndex=0;var S=d.exec(k),_=1}if(S){m&&(h=S[1]?S[1].length:0);A=(w=S.index+h)+(S=S[0].slice(h)).length;var j=k.slice(0,w),C=k.slice(A),E=[F,_];j&&(++F,v+=j.length,E.push(j));var N=new r(u,p?n.tokenize(S,p):S,b,S,f);if(E.push(N),C&&E.push(C),Array.prototype.splice.apply(t,E),1!=_&&n.matchGrammar(e,t,a,F,v,!0,u),l)break}else if(l)break}}}}},tokenize:function(e,t){var a=[e],r=t.rest;if(r){for(var s in r)t[s]=r[s];delete t.rest}return n.matchGrammar(e,a,t,0,0,!1),a},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,s=0;r=a[s++];)r(t)}},Token:r};function r(e,t,a,n,r){this.type=e,this.content=t,this.alias=a,this.length=0|(n||"").length,this.greedy=!!r}if(e.Prism=n,r.stringify=function(e,t){if("string"==typeof e)return e;if(Array.isArray(e))return e.map(function(e){return r.stringify(e,t)}).join("");var a={type:e.type,content:r.stringify(e.content,t),tag:"span",classes:["token",e.type],attributes:{},language:t};if(e.alias){var s=Array.isArray(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(a.classes,s)}n.hooks.run("wrap",a);var i=Object.keys(a.attributes).map(function(e){return e+'="'+(a.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+(i?" "+i:"")+">"+a.content+"</"+a.tag+">"},!e.document)return e.addEventListener?(n.disableWorkerMessageHandler||e.addEventListener("message",function(t){var a=JSON.parse(t.data),r=a.language,s=a.code,i=a.immediateClose;e.postMessage(n.highlight(s,n.languages[r],r)),i&&e.close()},!1),n):n;var s=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return s&&(n.filename=s.src,n.manual||s.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),n}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s\/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var a={};a["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},a.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:a}};n["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var r={};r[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",r)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var a=e.languages.markup;a&&(a.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:a.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},a.tag))}(Prism),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(e){e=e||document;var t={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(e.querySelectorAll("pre[data-src]")).forEach(function(e){if(!e.hasAttribute("data-src-loaded")){for(var a,n=e.getAttribute("data-src"),r=e,s=/\blang(?:uage)?-([\w-]+)\b/i;r&&!s.test(r.className);)r=r.parentNode;if(r&&(a=(e.className.match(s)||[,""])[1]),!a){var i=(n.match(/\.(\w+)$/)||[,""])[1];a=t[i]||i}var l=document.createElement("code");l.className="language-"+a,e.textContent="",l.textContent="Loading…",e.appendChild(l);var o=new XMLHttpRequest;o.open("GET",n,!0),o.onreadystatechange=function(){4==o.readyState&&(o.status<400&&o.responseText?(l.textContent=o.responseText,Prism.highlightElement(l),e.setAttribute("data-src-loaded","")):o.status>=400?l.textContent="✖ Error "+o.status+" while fetching file: "+o.statusText:l.textContent="✖ Error: File does not exist or is empty")},o.send(null)}}),Prism.plugins.toolbar&&Prism.plugins.toolbar.registerButton("download-file",function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&t.hasAttribute("data-src")&&t.hasAttribute("data-download-link")){var a=t.getAttribute("data-src"),n=document.createElement("a");return n.textContent=t.getAttribute("data-download-link-label")||"Download",n.setAttribute("download",""),n.href=a,n}})},document.addEventListener("DOMContentLoaded",function(){self.Prism.fileHighlight()}));
//# sourceMappingURL=/sm/a264a97a2f20660266cd3a454fb3decaf16e29e2a9ecf5259f4176ddbec26e70.map
</script>
<script>
Prism.languages.c=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean;
</script>
<script src="jquery.min.js"></script>
<script src="https://os.allcom.pl/hb/static/playground-embed.js" crossorigin="anonymous"></script>
<script src="https://os.allcom.pl/hb/static/play.js" crossorigin="anonymous"></script>
<script>
'use strict';
$(function() {
initPlayground(hbioTransport());
});
</script>