comparison website/src/manual.html @ 1645:0af6a9d6d12f

minor - keywords
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 03 Mar 2022 22:41:07 -0700
parents d3e61cd2aca0
children
comparison
equal deleted inserted replaced
1644:5c676385284b 1645:0af6a9d6d12f
3 <head> 3 <head>
4 <title>Luan Reference Manual</title> 4 <title>Luan Reference Manual</title>
5 <meta name="viewport" content="width=device-width, initial-scale=1"> 5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <style> 6 <style>
7 @import "site.css"; 7 @import "site.css";
8
9 p[keywords] {
10 font-family: monospace;
11 margin-left: 40px;
12 max-width: 700px;
13 }
14 p[keywords] span {
15 display: inline-block;
16 width: 100px;
17 }
8 </style> 18 </style>
9 </head> 19 </head>
10 <body> 20 <body>
11 21
12 <div small> 22 <div small>
528 <p> 538 <p>
529 The following <em>keywords</em> are reserved 539 The following <em>keywords</em> are reserved
530 and cannot be used as names: 540 and cannot be used as names:
531 541
532 542
533 <pre> 543 <p keywords>
534 and break do else elseif end 544 <span>and</span>
535 end_do end_for end_function end_if end_while 545 <span>break</span>
536 false for function goto if in 546 <span>catch</span>
537 local nil not or repeat return 547 <span>continue</span>
538 then true until while 548 <span>do</span>
539 </pre> 549 <span>else</span>
550 <span>elseif</span>
551 <span>end_do</span>
552 <span>end_for</span>
553 <span>end_function</span>
554 <span>end_if</span>
555 <span>end_try</span>
556 <span>end_while</span>
557 <span>false</span>
558 <span>finally</span>
559 <span>for</span>
560 <span>function</span>
561 <span>if</span>
562 <span>in</span>
563 <span>local</span>
564 <span>nil</span>
565 <span>not</span>
566 <span>or</span>
567 <span>repeat</span>
568 <span>return</span>
569 <span>then</span>
570 <span>true</span>
571 <span>try</span>
572 <span>until</span>
573 <span>while</span>
574 </p>
540 575
541 <p> 576 <p>
542 Luan is a case-sensitive language: 577 Luan is a case-sensitive language:
543 <code>and</code> is a reserved word, but <code>And</code> and <code>AND</code> 578 <code>and</code> is a reserved word, but <code>And</code> and <code>AND</code>
544 are two different, valid names. 579 are two different, valid names.
950 <p> 985 <p>
951 The <b>break</b> statement terminates the execution of a 986 The <b>break</b> statement terminates the execution of a
952 <b>while</b>, <b>repeat</b>, or <b>for</b> loop, 987 <b>while</b>, <b>repeat</b>, or <b>for</b> loop,
953 skipping to the next statement after the loop: 988 skipping to the next statement after the loop:
954 989
955
956 <pre> 990 <pre>
957 stat ::= <b>break</b> 991 stat ::= <b>break</b>
958 </pre> 992 </pre>
959 993
960 <p> 994 <p>
961 A <b>break</b> ends the innermost enclosing loop. 995 A <b>break</b> ends the innermost enclosing loop.
996
997
998 <p>
999 The <b>continue</b> statement jumps to the beginning of a
1000 <b>while</b>, <b>repeat</b>, or <b>for</b> loop for next iteration,
1001 skipping the execution of statements inside the body of loop for the current iteration:
1002
1003 <pre>
1004 stat ::= <b>continue</b>
1005 </pre>
962 1006
963 1007
964 <p> 1008 <p>
965 The <b>return</b> statement is used to return values 1009 The <b>return</b> statement is used to return values
966 from a function or a chunk 1010 from a function or a chunk