forked from rjpcomputing/luaforwindows
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathluaforwindows.html
More file actions
1409 lines (1307 loc) · 49.8 KB
/
luaforwindows.html
File metadata and controls
1409 lines (1307 loc) · 49.8 KB
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
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base target="_top">
<style type="text/css">
/* default css */
table {
font-size: 1em;
line-height: inherit;
border-collapse: collapse;
}
tr {
text-align: left;
}
div, address, ol, ul, li, option, select {
margin-top: 0px;
margin-bottom: 0px;
}
p {
margin: 0px;
}
pre {
font-family: Courier New;
white-space: pre-wrap;
margin:0;
}
body {
margin: 6px;
padding: 0px;
font-family: Verdana, sans-serif;
font-size: 10pt;
background-color: #ffffff;
color: #000;
}
img {
-moz-force-broken-image-icon: 1;
}
@media screen {
html.pageview {
background-color: #f3f3f3 !important;
overflow-x: hidden;
overflow-y: scroll;
}
body {
min-height: 1100px;
counter-reset: __goog_page__;
}
* html body {
height: 1100px;
}
/* Prevent repaint errors when scrolling in Safari. This "Star-7" css hack
targets Safari 3.1, but not WebKit nightlies and presumably Safari 4.
That's OK because this bug is fixed in WebKit nightlies/Safari 4 :-). */
html*#wys_frame::before {
content: '\A0';
position: fixed;
overflow: hidden;
width: 0;
height: 0;
top: 0;
left: 0;
}
.pageview body {
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
border-right: 2px solid #bbb;
border-bottom: 2px solid #bbb;
width: 648px !important;
margin: 15px auto 25px;
padding: 40px 50px;
}
/* IE6 */
* html {
overflow-y: scroll;
}
* html.pageview body {
overflow-x: auto;
}
.writely-callout-data {
display: inline-block;
width: 1px;
height: 1px;
overflow: hidden;
margin-left: -1px;
}
.writely-footnote-marker {
background-image: url('MISSING');
background-color: transparent;
background-repeat: no-repeat;
width: 7px;
overflow: hidden;
height: 16px;
vertical-align: top;
-moz-user-select: none;
}
.editor .writely-footnote-marker {
cursor: move;
}
.writely-footnote-marker-highlight {
background-position: -15px 0;
-moz-user-select: text;
}
.writely-footnote-hide-selection ::-moz-selection, .writely-footnote-hide-selection::-moz-selection {
background: transparent;
}
.writely-footnote-hide-selection ::selection, .writely-footnote-hide-selection::selection {
background: transparent;
}
.writely-footnote-hide-selection {
cursor: move;
}
/* Comments */
.writely-comment-yellow {
background-color: #ffffd7;
}
.writely-comment-orange {
background-color: #ffe3c0;
}
.writely-comment-pink {
background-color: #ffd7ff;
}
.writely-comment-green {
background-color: #d7ffd7;
}
.writely-comment-blue {
background-color: #d7ffff;
}
.writely-comment-purple {
background-color: #eed7ff;
}
.br_fix span+br:not(:-moz-last-node) {
position:relative;
left: -1ex
}
#cb-p-tgt {
font-size: 8pt;
padding: .4em;
background-color: #ddd;
color: #333;
}
#cb-p-tgt-can {
text-decoration: underline;
color: #36c;
font-weight: bold;
margin-left: 2em;
}
#cb-p-tgt .spin {
width: 16px;
height: 16px;
background: url(//ssl.gstatic.com/docs/clipboard/spin_16o.gif) no-repeat;
}
}
h6 { font-size: 8pt }
h5 { font-size: 8pt }
h4 { font-size: 10pt }
h3 { font-size: 12pt }
h2 { font-size: 14pt }
h1 { font-size: 18pt }
blockquote {padding: 10px; border: 1px #DDD dashed }
.webkit-indent-blockquote { border: none; }
a img {border: 0}
.pb {
border-width: 0;
page-break-after: always;
/* We don't want this to be resizeable, so enforce a width and height
using !important */
height: 1px !important;
width: 100% !important;
}
.editor .pb {
border-top: 1px dashed #C0C0C0;
border-bottom: 1px dashed #C0C0C0;
}
div.google_header, div.google_footer {
position: relative;
margin-top: 1em;
margin-bottom: 1em;
}
/* Table of contents */
.editor div.writely-toc {
background-color: #f3f3f3;
border: 1px solid #ccc;
}
.writely-toc > ol {
padding-left: 3em;
font-weight: bold;
}
ol.writely-toc-subheading {
padding-left: 1em;
font-weight: normal;
}
/* IE6 only */
* html writely-toc ol {
list-style-position: inside;
}
.writely-toc-none {
list-style-type: none;
}
.writely-toc-decimal {
list-style-type: decimal;
}
.writely-toc-upper-alpha {
list-style-type: upper-alpha;
}
.writely-toc-lower-alpha {
list-style-type: lower-alpha;
}
.writely-toc-upper-roman {
list-style-type: upper-roman;
}
.writely-toc-lower-roman {
list-style-type: lower-roman;
}
.writely-toc-disc {
list-style-type: disc;
}
/* Ordered lists converted to numbered lists can preserve ordered types, and
vice versa. This is confusing, so disallow it */
ul[type="i"], ul[type="I"], ul[type="1"], ul[type="a"], ul[type="A"] {
list-style-type: disc;
}
ol[type="disc"], ol[type="circle"], ol[type="square"] {
list-style-type: decimal;
}
/* end default css */
/* default print css */
@media print {
body {
padding: 0;
margin: 0;
}
div.google_header, div.google_footer {
display: block;
min-height: 0;
border: none;
}
div.google_header {
flow: static(header);
}
/* used to insert page numbers */
div.google_header::before, div.google_footer::before {
position: absolute;
top: 0;
}
div.google_footer {
flow: static(footer);
}
/* always consider this element at the start of the doc */
div#google_footer {
flow: static(footer, start);
}
span.google_pagenumber {
content: counter(page);
}
span.google_pagecount {
content: counter(pages);
}
.endnotes {
page: endnote;
}
/* MLA specifies that endnotes title should be 1" margin from the top of the page. */
@page endnote {
margin-top: 1in;
}
callout.google_footnote {
display: prince-footnote;
footnote-style-position: inside;
/* These styles keep the footnote from taking on the style of the text
surrounding the footnote marker. They can be overridden in the
document CSS. */
color: #000;
font-family: Verdana;
font-size: 10.0pt;
font-weight: normal;
}
/* Table of contents */
#WritelyTableOfContents a::after {
content: leader('.') target-counter(attr(href), page);
}
#WritelyTableOfContents a {
text-decoration: none;
color: black;
}
/* Comments */
.writely-comment-yellow {
background-color: #ffffd7;
}
.writely-comment-orange {
background-color: #ffe3c0;
}
.writely-comment-pink {
background-color: #ffd7ff;
}
.writely-comment-green {
background-color: #d7ffd7;
}
.writely-comment-blue {
background-color: #d7ffff;
}
.writely-comment-purple {
background-color: #eed7ff;
}
}
@page {
@top {
content: flow(header);
}
@bottom {
content: flow(footer);
}
@footnotes {
border-top: solid black thin;
padding-top: 8pt;
}
}
/* end default print css */
/* custom css */
/* end custom css */
/* ui edited css */
body {
font-family: Verdana;
font-size: 10.0pt;
line-height: normal;
background-color: #ffffff;
}
/* end ui edited css */
/* editor CSS */
.editor a:visited {color: #551A8B}
.editor table.zeroBorder {border: 1px dotted gray}
.editor table.zeroBorder td {border: 1px dotted gray}
.editor table.zeroBorder th {border: 1px dotted gray}
.editor div.google_header, .editor div.google_footer {
border: 2px #DDDDDD dashed;
position: static;
width: 100%;
min-height: 2em;
}
.editor .misspell {background-color: yellow}
.editor .writely-comment {
font-size: 9pt;
line-height: 1.4;
padding: 1px;
border: 1px dashed #C0C0C0
}
/* end editor CSS */
</style>
<title>luaforwindows</title>
</head>
<body
>
<div class=Section1 id=cxsx0>
<a id=top name=top></a><br id=eov41>
<hr id=ve-l0 noshade style=HEIGHT:25px;WIDTH:100%>
<h1 id=d7pr0 style=MARGIN-LEFT:40px>
<span class=GramE id=cxsx2><font face=verdana>Lua for Windows – A Short Introduction.</font></span>
</h1>
<p class=MsoBodyText id=cxsx6 style=MARGIN-LEFT:120px>
<font id=anho0 size=3><font face=verdana><a href=#part1 id=vsa4 target=_self title="1. What is Lua?">1. What is Lua?</a><br id=cxsx8>
<a href=#part2 id=ay8t target=_self title="2. What is Lua for Windows?">2. What is Lua for Windows?</a><br id=cxsx9>
<a href=#part3 id=hqas target=_self title="3. What comes with Lua for Windows?">3. What comes with Lua for Windows?</a><br id=cxsx10>
<a href=#part4 id=mp-g target=_self title="4. Using Lua for Windows.">4. Using Lua for Windows.</a><br id=cxsx11>
<a href=#part41 id=ms.r target=_self title="4.1 Running Lua Programs.">4.1 Running Lua Programs.</a><br id=cxsx12>
<a href=#part42 id=kkrg target=_self title="4.2 Editing Lua Programs.">4.2 Editing Lua Programs.</a><br id=cxsx13>
<a href=#part43 id=o253 target=_self title="4.3 Debugging Lua Programs.">4.3 Debugging Lua Programs.</a><br id=cxsx14>
<a href=#part44 id=hm6y target=_self title="4.4 Using Lua without command console.">4.4 Using Lua without command console.</a><br id=cxsx15>
<a href=#part5 id=p6nr target=_self title="5. Concise Overview of Lua Programming Language.">5. Concise Overview of Lua Programming Language.</a><br id=cxsx16>
<a href=#part6 id=yl5- target=_self title="6. Libraries included with Lua for Windows.">6. Libraries included with Lua for Windows.</a><br id=cxsx17>
<a href=#part7 id=i.ed target=_self title="7. Learn more about Lua.">7. Learn more about Lua.</a><br id=cxsx18>
</font></font><font id=iu81 size=3><a href=#part8 id=rb:e target=_self title="8. Acknowledgments.">8. Acknowledgments.</a></font>
</p>
<p class=MsoBodyText id=n_fq>
<br id=cxsx20>
</p>
<hr id=ve-l1 noshade style=HEIGHT:25px;WIDTH:100%>
<h2 id=mfi10>
<a id=part1 name=part1></a><font face=verdana>1. What is Lua?</font>
</h2>
<div id=xax_ style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
Lua is a small, fast, interpreted scripting language. Lua is the result of a merger of a configuration language (SOL) and a data entry language (DEL) . Lua's original goal was to be an extensible embedded scripting language inside software applications. Lua has been highly successful as an embedded scripting language and is used in many games, firmware and software applications. With the recent addition of modules, Lua now has a standard method to load libraries. Lua together with Lua libraries enables a complete standalone scripting language. <br id=eov43>
<br id=eov44>
Lua’s unique focus on extensibility, simplicity, efficiency and portability make it a small yet powerful scripting language. Lua is often used as a Domain Specific Language due to its small size, embeddability and portability. Lua supports a small set of general features and provides meta-mechanisms to allow the programmer to support programming styles of their choice. <br id=eov45>
<br id=eov46>
Lua was developed by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes at the Pontifical University of Rio de Janeiro (PUC-Rio), in Brazil.<br id=eov47>
<br id=eov48>
Lua means Moon in Portuguese, so be ready for libraries with references to space or the moon, and enjoy.<br id=jtwm1>
<a href=#top id=u7yk target=_self title="Back to top of document.">^</a><br id=eov49>
</div>
<div id=eov42 style=MARGIN-LEFT:40px>
<br id=eov410>
</div>
<h2 id=nthd0>
<a id=part2 name=part2></a><font face=verdana>2. What is Lua for Windows?</font>
</h2>
<p class=MsoBodyText id=n_fq0 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
Lua for Windows is a 'batteries included environment' for the Lua scripting language on Windows.
</p>
<p class=MsoBodyText id=n_fq1 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
</p>
<p class=MsoBodyText id=n_fq2 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
Lua for Windows combines Lua binaries, Lua libraries with a Lua-capable editor in a single install package for the Microsoft Windows operating system. Lua for Windows contains everything you need to write, run and debug Lua scripts on Windows. A wide variety of libraries and examples are included that are ready to use with Microsoft Windows. Lua for Windows runs on Windows 2000 and newer versions of Windows. Lua and its associated libraries are also available for other operating systems, so most scripts will be automatically cross-platform. <a href=http://docs.google.com/RawDocContents?docID=dfxf6f4d_19gbt5shdb&justBody=false&revision=_latest&timestamp=1213702923806&editMode=true&strip=true#top id=n_fq3 title="Back to top of document."></a>
</p>
<p class=MsoBodyText id=jtwm2 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
<a href=http://docs.google.com/RawDocContents?docID=dfxf6f4d_19gbt5shdb&justBody=false&revision=_latest&timestamp=1213702923806&editMode=true&strip=true#top id=jtwm3 title="Back to top of document."></a><font id=jtwm4 size=2><a href=luaforwindows.html#top id=zama title="Back to top of document.">^</a></font>
</p>
<p class=MsoBodyText id=n_fq4 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
<br id=y9ya0>
</p>
<h2 id=dd520>
<a id=part3 name=part3></a><font face=verdana>3. What comes with Lua for Windows?</font>
</h2>
<div id=t9jj0 style=MARGIN-LEFT:40px>
<font face=verdana>Lua for Windows comes with</font>:<br id=cxsx49>
</div>
<div id=mi.x3 style=TEXT-ALIGN:left>
<table border=0 cellpadding=0 cellspacing=2 class=zeroBorder id=eov411 style=HEIGHT:101px;MARGIN-LEFT:80px;TEXT-ALIGN:left;WIDTH:599px>
<tbody id=eov412>
<tr id=eov413>
<td id=eov414>
Lua Interpreter:
</td>
<td id=eov415>
Start/Programs/Lua/Lua (Command Line)
</td>
</tr>
<tr id=eov416>
<td id=eov417>
<font face=verdana><font id=pd3q59 size=2>Lua Reference:</font></font>
</td>
<td id=eov418>
<font face=verdana><font id=n_fq9 size=2>Start/Programs/Lua/Documentation/Lua 5.1 Reference Manual.</font></font>
</td>
</tr>
<tr id=eov419>
<td id=eov420>
<font face=verdana><font id=n_fq11 size=2>Quick Lua Tour: </font></font>
</td>
<td id=eov421>
<font face=verdana><font id=n_fq13 size=2>Start/Programs/Lua/Lua Examples/QuickLuaTour.lua</font></font>
</td>
</tr>
<tr id=eov422>
<td id=eov423>
<font face=verdana><font id=pd3q60 size=2>Examples:</font></font>
</td>
<td id=eov424>
<font face=verdana><font id=n_fq15 size=2>Start/Programs/Lua/Lua Examples.</font></font>
</td>
</tr>
<tr id=eov425>
<td id=eov426>
<font face=verdana><font id=pd3q62 size=2>Documents:</font></font>
</td>
<td id=eov427>
<font face=verdana><font id=n_fq17 size=2>Start/Programs/Lua/Documentation.</font></font>
</td>
</tr>
<tr id=eov428>
<td id=eov429>
Libraries:
</td>
<td id=eov430>
<a href=#part6 id=a3hp target=_self title="See Section 6. Libraries included with Lua for Windows">See Section 6. Libraries included with Lua for Windows</a>. <a href=#top id=jtwm6 target=_self title="Back to top of document."></a>
</td>
</tr>
</tbody>
</table>
</div>
<div id=mi.x6 style=MARGIN-LEFT:40px;TEXT-ALIGN:left>
<font id=jtwm7 size=2><a href=luaforwindows.html#top id=jtwm8 title="Back to top of document.">^</a><br id=jtwm9>
</font>
</div>
<h2 id=y30n0>
<a id=part4 name=part4></a><font face=verdana>4. Using Lua for Windows.</font>
</h2>
<h3 id=y30n2>
<font face=verdana> <span class=GramE id=i0nb><a id=qdl1 name=part41></a>4.1 Running</span> Lua Programs.</font>
</h3>
<div id=jtwm10 style=MARGIN-LEFT:40px>
The interpreter can be run by typing lua.exe from command prompt:<br id=eov432>
</div>
<div id=n_fq20 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
<div id=eov433 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
C:\>lua.exe<br id=eov434>
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio<br id=eov435>
><br id=eov436>
</div>
Type in print("hello") press enter, should get back hello<br id=eov437>
> print("hello") <br id=eov438>
<div id=eov439 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
hello<br>
><br id=eov441>
<br id=eov442>
</div>
To run Lua Script from command line, <span class=SpellE id=cxsx82>goto</span> directory containing <span class=SpellE id=cxsx83>Lua</span> script and type in name of script at command prompt. <br id=xax_0>
<br id=cxsx86>
</div>
<p class=MsoBodyText id=n_fq21 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana>From Explorer double click on .<span class=SpellE id=cxsx87>lua</span> file and Lua interpreter will run that .lua file.</font>
</p>
<p class=MsoBodyText id=n_fq23 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana> <br id=cxsx89>
From Start/Programs/Lua/SciTE, edit <span class=SpellE id=cxsx90>lua</span> script from SciTE press F5 to run. </font>
</p>
<p class=MsoBodyText id=jtwm11 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana><a href=#top id=jblj target=_self title="Back to top of document">^</a></font>
</p>
<h3 id=qf621>
<font face=verdana> <span class=GramE id=i08p><a id=syu3 name=part42></a>4.2 Editing</span> Lua Programs.</font>
</h3>
<p class=MsoBodyText id=n_fq27 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana>From explorer or command line use any text editor you wish. </font><font face=verdana>Save with .lua file name extension and run as decribed above.</font>
</p>
<p class=MsoBodyText id=n_fq30 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<br id=cxsx99>
<font face=verdana>From Start/Programs/Lua/SciTE, use SciTE editor to edit a Lua script. </font><a href=#top id=ymmf target=_self title="Back to top of document"></a>
</p>
<p class=MsoBodyText id=jtwm13 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana><a href=#top id=jtwm15 target=_self title="Back to top of document">^</a></font><br id=cxsx104>
</p>
<h3 id=qf622>
<font face=verdana> <span class=GramE id=hckn><a id=m0r3 name=part43></a>4.3 Debugging</span> Lua Programs.</font>
</h3>
<p class=MsoBodyText id=n_fq34 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana>From Start/Programs/Lua/SciTE , open your <span class=SpellE id=cxsx108>Lua</span> script, then <br id=cxsx109>
</font><font face=verdana>Press ALT-R to starting Debug/Continue,</font>
</p>
<p class=MsoBodyText id=n_fq37 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana> F9 to toggle breakpoints,<br id=cxsx111>
ALT-C to step one line at a time,<br id=cxsx112>
</font><font face=verdana> ALT-N to step over,</font>
</p>
<p class=MsoBodyText id=n_fq40 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana> ALT-M to step out,</font>
</p>
<p class=MsoBodyText id=n_fq42 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana> ALT-K to kill debug session,</font>
</p>
<p class=MsoBodyText id=n_fq44 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana> ALT-L to show local variables,</font>
</p>
<p class=MsoBodyText id=n_fq46 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana> ALT-I to inspect variable,</font>
</p>
<p class=MsoBodyText id=n_fq48 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana> ALT-CTRL-B for stack stack,</font>
</p>
<p class=MsoBodyText id=n_fq50 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana> ALT-W to watch variable,</font>
</p>
<p class=MsoBodyText id=n_fq52 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana> ALT-G goto a specific line as debugging.</font>
</p>
<p class=MsoBodyText id=n_fq54 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
</p>
<p class=MsoBodyText id=n_fq55 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana>SciTE also has toolbar buttons for most common debug operations.</font> <a href=#top id=ok9x target=_self title="Back to top of document"></a>
</p>
<p class=MsoBodyText id=jtwm16 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana><a href=#top id=jtwm18 target=_self title="Back to top of document">^</a> </font><br id=h861>
</p>
<h3 id=qf624>
<font face=verdana> <a id=po86 name=part44></a>4.4 Using Lua without command console.</font>
</h3>
<p class=MsoBodyText id=n_fq61 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana><span class=GramE id=cxsx120>To run Lua scripts without a command console use wlua.exe. GUI examples from </span></font><font face=verdana>IUP library have been renamed to *.wlua and run without a console. For example, from Start/Programs/Lua/Lua Examples <span class=SpellE id=cxsx124>go to</span> <span class=SpellE id=cxsx125>iup\elem\iupmenu</span> directory and double click on <span class=SpellE id=cxsx127>iupmenu.wlua</span> to run a GUI app. </font>
</p>
<p class=MsoBodyText id=jtwm19 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px>
<font face=verdana><a href=#top id=ng9g target=_self title="Back to top of document">^</a></font>
</p>
<h2 class=MsoBodyText id=n_fq66>
<a id=part5 name=part5></a><font face=verdana>5. <span class=GramE id=cxsx131>Concise Overview of Lua Programming Language.</span></font>
</h2>
<div id=q.bg0 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
Lua is a simple yet powerful dynamically typed programming language. Lua is one of the fastest, if not fastest, interpreted scripting languages available, see <a href=http://dada.perl.it/shootout/craps.html id=cxsx136>http://dada.perl.it/shootout/craps.html</a>.<br id=eov447>
<br id=cxsx137>
</div>
<div id=gv-b0 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
Lua has 8 basic types: nil, boolean, number, string, table, function, thread<span class=GramE id=cxsx139>,</span> userdata.<br id=t6:i>
<br id=gc7z>
Numbers are floating point values. Strings are non-mutable. Table is the basic data structure used to represent complex data.
</div>
<p class=MsoBodyText id=n_fq68 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
</p>
<div id=q.bg1 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
Lua has 21 reserved keywords: and, break, do, else, <span class=SpellE id=cxsx143>elseif</span>, end, false, for<span class=GramE id=cxsx144>,</span> function, if, in, local, nil, not, or, repeat, return, then, true, until, while.<br id=eov448>
<br id=cxsx147>
</div>
<div id=q.bg2 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
Lua has 6 control structures: do end block statement, if statement<span class=GramE id=cxsx149>, </span>while statement, repeat until statement, for statement and break statement.<br id=t6:i0>
<br id=eov449>
</div>
<div id=fbdo1 style=MARGIN-LEFT:40px;MARGIN-RIGHT:40px;TEXT-ALIGN:left>
Lua has multiple assignments and return multiple values from functions.<br id=etui>
<br id=ky_50>
Lua has garbage collection, closures, tail calls, coercion, <span class=SpellE id=cxsx153>co-routines</span>, first order functions, meta-mechanisms and loadable libraries.<br id=t6:i1>
<br id=eov450>
Lua is a multi-paradigm language and uses meta-mechanisms to extend Lua to support different styles of programming including object-oriented and functional styles.<br id=c8c8>
<br id=n_fq69>
Lua is a very powerful; condensed scripting language.<br id=jtwm21>
<a href=#top id=irjz target=_self title="Back to top of document.">^</a><br id=mlwj30>
</div>
<h2 id=d7pr1>
<a id=part6 name=part6></a>6. Libraries included with Lua for Windows
</h2>
<table border=1 cellpadding=0 cellspacing=0 class=MsoNormalTable id=pg.f style="BORDER:1pt outset #444444;HEIGHT:754px;MARGIN-LEFT:40px;WIDTH:656px">
<tbody id=o2f:2>
<tr id=z1ve2>
<td id=z1ve3 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:3 style=MARGIN-RIGHT:0pt;TEXT-ALIGN:center>
<b>Library<br id=wb-l1>
</b>
</p>
</td>
<td id=pb8.0 style="BORDER:1pt inset #444444" valign=center>
<p align=center id=o2f:6 style=MARGIN-RIGHT:0pt;TEXT-ALIGN:center>
<b><font face=verdana><font id=pd3q0 size=2>Version </font></font></b>
</p>
</td>
<td id=z1ve5 style="BORDER:1pt inset #444444">
<p id=o2f:10 style=MARGIN-RIGHT:0pt;TEXT-ALIGN:center>
<b><font face=verdana><font id=pd3q1 size=2>Description</font></font></b>
</p>
</td>
</tr>
<tr id=z1ve9>
<td id=z1ve10 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:14 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q2 size=2>Alien</font></font>
</p>
</td>
<td id=pb8.3 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:17 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q3 size=2>0.5.0</font></font>
</p>
</td>
<td id=z1ve12 style="BORDER:1pt inset #444444">
<p id=o2f:20 style=MARGIN:0pt>
<font face=verdana><font id=pd3q4 size=2>Provides access to functions in an unknown or new .dll.</font></font>
</p>
</td>
</tr>
<tr id=z1ve16>
<td id=z1ve17 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:23 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q5 size=2>IUP</font></font>
</p>
</td>
<td id=pb8.5 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:26 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q6 size=2>3.5.0</font></font>
</p>
</td>
<td id=z1ve19 style="BORDER:1pt inset #444444">
<p id=o2f:29 style=MARGIN:0pt>
<font face=verdana><font id=pd3q7 size=2>Light Portable Graphical User Interface library.</font></font>
</p>
</td>
</tr>
<tr id=z1ve23>
<td id=z1ve24 style="BORDER:1pt inset #444444" valign=center>
<font face=verdana><font id=pd3q8 size=2>CD</font></font>
</td>
<td id=pb8.7 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:35 style=MARGIN-RIGHT:0pt>
5.4.1
</p>
</td>
<td id=z1ve26 style="BORDER:1pt inset #444444">
<p id=o2f:38 style=MARGIN:0pt>
<font face=verdana><font id=pd3q9 size=2>Canvas Draw: A </font></font>platform-independent graphic library.
</p>
</td>
</tr>
<tr id=z1ve30>
<td id=z1ve31 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:41 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q10 size=2>IM</font></font>
</p>
</td>
<td id=pb8.9 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:44 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q11 size=2>3.6.3</font></font>
</p>
</td>
<td id=z1ve33 style="BORDER:1pt inset #444444">
<p id=o2f:47 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q12 size=2>A toolkit for Digital Imaging. </font></font>
</p>
</td>
</tr>
<tr id=bycb0>
<td id=bycb1 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:50 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q13 size=2>Ex</font></font>
</p>
</td>
<td id=pb8.11 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:53 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q14 size=2>Jan 07</font></font>
</p>
</td>
<td id=bycb3 style="BORDER:1pt inset #444444" valign=top>
<p id=o2f:56 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q15 size=2>Adds environment, file system, I/O (Locking and pipes), and process control.</font></font>
</p>
</td>
</tr>
<tr id=z1ve37>
<td id=z1ve38 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:59 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q16 size=2>LPeg</font></font>
</p>
</td>
<td id=pb8.13 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:62 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q17 size=2>0.10</font></font>
</p>
</td>
<td id=z1ve40 style="BORDER:1pt inset #444444">
<p id=o2f:65 style=MARGIN:0pt>
<font face=verdana>Pattern</font>-matching library based on Parsing Expression Grammars (PEGs).
</p>
</td>
</tr>
<tr id=z1ve44>
<td id=z1ve45 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:68 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q18 size=2>Lua-GD</font></font>
</p>
</td>
<td id=pb8.15 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:71 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q19 size=2>2.9.33r2</font></font>
</p>
</td>
<td id=z1ve47 style="BORDER:1pt inset #444444">
<p id=o2f:74 style=MARGIN:0pt>
<font face=verdana><font id=pd3q20 size=2>Image manipulation library based on Thomas </font>Boutell’s<font id=pd3q21 size=2> GD library.</font></font>
</p>
</td>
</tr>
<tr id=z1ve51>
<td id=z1ve52 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:77 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q22 size=2>LuaCOM</font></font>
</p>
</td>
<td id=pb8.17 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:80 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q23 size=2>1.4</font></font>
</p>
</td>
<td id=z1ve54 style="BORDER:1pt inset #444444">
<p id=o2f:83 style=MARGIN:0pt>
<font face=verdana><font id=pd3q24 size=2>Enable use & implementation of Microsoft’s Component Object Model.</font></font>
</p>
</td>
</tr>
<tr id=z1ve58>
<td id=z1ve59 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:86 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q25 size=2>LuaCURL</font></font>
</p>
</td>
<td id=pb8.19 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:89 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q26 size=2>1.0</font></font>
</p>
</td>
<td id=z1ve61 style="BORDER:1pt inset #444444">
<p id=o2f:92 style=MARGIN:0pt>
<font face=verdana>Interface</font> to Internet browsing capabilities based on the cURL library.
</p>
</td>
</tr>
<tr id=z1ve65>
<td id=z1ve66 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:95 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q27 size=2>Date</font></font>
</p>
</td>
<td id=pb8.21 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:98 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q28 size=2>2</font></font>
</p>
</td>
<td id=z1ve68 style="BORDER:1pt inset #444444">
<p id=o2f:101 style=MARGIN:0pt>
<font face=verdana><font id=pd3q29 size=2>Date and Time library for Lua.</font></font>
</p>
</td>
</tr>
<tr id=z1ve72>
<td id=z1ve73 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:104 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q30 size=2>LuaDoc</font></font>
</p>
</td>
<td id=pb8.23 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:107 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q31 size=2>3.01</font></font>
</p>
</td>
<td id=z1ve75 style="BORDER:1pt inset #444444">
<p id=o2f:110 style=MARGIN:0pt>
<font face=verdana>Documentation</font> tool for Lua source code.
</p>
</td>
</tr>
<tr id=z1ve79>
<td id=z1ve80 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:113 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q32 size=2>LuaExpat</font></font>
</p>
</td>
<td id=pb8.25 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:116 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q33 size=2>1.1.0</font></font>
</p>
</td>
<td id=z1ve82 style="BORDER:1pt inset #444444">
<p id=o2f:119 style=MARGIN:0pt>
<font face=verdana>Lua</font> interface to XML Expat parsing library.
</p>
</td>
</tr>
<tr id=z1ve86>
<td id=z1ve87 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:122 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q34 size=2>LuaFileSystem</font></font>
</p>
</td>
<td id=pb8.27 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:125 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q35 size=2>1.4.2</font></font>
</p>
</td>
<td id=z1ve89 style="BORDER:1pt inset #444444">
<p id=o2f:128 style=MARGIN:0pt>
<font face=verdana>Access</font> the directory structure and file attributes.
</p>
</td>
</tr>
<tr id=z1ve93>
<td id=z1ve94 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:131 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q36 size=2>LuaLogging</font></font>
</p>
</td>
<td id=pb8.29 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:134 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q37 size=2>1.2.0</font></font>
</p>
</td>
<td id=z1ve96 style="BORDER:1pt inset #444444">
<p id=o2f:137 style=MARGIN:0pt>
<font face=verdana><font id=pd3q38 size=2>Logging features in Lua, based on log4j.</font></font>
</p>
</td>
</tr>
<tr id=z1ve100>
<td id=z1ve101 style="BORDER:1pt inset #444444" valign=center>
<font face=verdana><font id=pd3q39 size=2>LuaProfiler</font></font>
</td>
<td id=pb8.31 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:143 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q40 size=2>2.0.1</font></font>
</p>
</td>
<td id=z1ve103 style="BORDER:1pt inset #444444">
<p id=o2f:146 style=MARGIN:0pt>
<font face=verdana>Time</font> profiler designed to find bottlenecks in Lua programs.
</p>
</td>
</tr>
<tr id=z1ve107>
<td id=z1ve108 style="BORDER:1pt inset #444444" valign=center>
<font face=verdana><font id=pd3q41 size=2>LuaSocket</font></font>
</td>
<td id=pb8.33 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:152 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q42 size=2>2.0.2</font></font>
</p>
</td>
<td id=z1ve110 style="BORDER:1pt inset #444444">
<p id=o2f:155 style=MARGIN:0pt>
<font face=verdana>Lua</font> interface to support HTTP,FTP,SMTP, MIME, URL & LTN12.
</p>
</td>
</tr>
<tr id=z1ve114>
<td id=z1ve115 style="BORDER:1pt inset #444444" valign=center>
<font face=verdana><font id=pd3q43 size=2>LuaSQL</font></font>
</td>
<td id=pb8.35 style="BORDER:1pt inset #444444" valign=center>
<p id=o2f:161 style=MARGIN-RIGHT:0pt>
<font face=verdana><font id=pd3q44 size=2>2.1.1</font></font>