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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset= ISO-8859-1">
<TITLE>
Expressions
</TITLE>
</HEAD>
<BODY >
<A HREF="manual012.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual014.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<A HREF="manual006.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<HR>
<H2>5.7 Expressions</H2> <A NAME="s:value-expr"></A>
<A NAME="@manual.kwd8"></A>
<A NAME="@manual.kwd9"></A>
<A NAME="@manual.kwd10"></A>
<A NAME="@manual.kwd11"></A>
<A NAME="@manual.kwd12"></A>
<A NAME="@manual.kwd13"></A>
<A NAME="@manual.kwd14"></A>
<A NAME="@manual.kwd15"></A>
<A NAME="@manual.kwd16"></A>
<A NAME="@manual.kwd17"></A>
<A NAME="@manual.kwd18"></A>
<A NAME="@manual.kwd19"></A>
<A NAME="@manual.kwd20"></A>
<A NAME="@manual.kwd21"></A>
<A NAME="@manual.kwd22"></A>
<A NAME="@manual.kwd23"></A>
<A NAME="@manual.kwd24"></A>
<A NAME="@manual.kwd25"></A>
<A NAME="@manual.kwd26"></A>
<A NAME="@manual.kwd27"></A>
<A NAME="@manual.kwd28"></A>
<A NAME="@manual.kwd29"></A>
<A NAME="@manual.kwd30"></A><DIV ALIGN=center>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD ALIGN=right NOWRAP>
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
<TD ALIGN=right NOWRAP>::=</TD>
<TD ALIGN=left NOWRAP>
<TT><I><FONT COLOR=maroon>value-path</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>constant</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>begin</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>end</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>:</FONT></TT> <TT><I><FONT COLOR=maroon>typexpr</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>,</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> { <TT><FONT COLOR=blue>,</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> }</TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>ncconstr</FONT></I></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>::</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>[</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> { <TT><FONT COLOR=blue>;</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> } <TT><FONT COLOR=blue>]</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>[|</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> { <TT><FONT COLOR=blue>;</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> } <TT><FONT COLOR=blue>|]</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>{</FONT></TT> <TT><I><FONT COLOR=maroon>label</FONT></I></TT> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> { <TT><FONT COLOR=blue>;</FONT></TT> <TT><I><FONT COLOR=maroon>label</FONT></I></TT> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> } <TT><FONT COLOR=blue>}</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>prefix-symbol</FONT></I></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><I><FONT COLOR=maroon>infix-op</FONT></I></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>.</FONT></TT> <TT><I><FONT COLOR=maroon>label</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>.</FONT></TT> <TT><I><FONT COLOR=maroon>label</FONT></I></TT> <TT><FONT COLOR=blue><-</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>.(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>.(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT> <TT><FONT COLOR=blue><-</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>.[</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>]</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>.[</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>]</FONT></TT> <TT><FONT COLOR=blue><-</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>if</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>then</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> [ <TT><FONT COLOR=blue>else</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> ]</TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>while</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>do</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>done</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>for</FONT></TT> <TT><I><FONT COLOR=maroon>ident</FONT></I></TT> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> ( <TT><FONT COLOR=blue>to</FONT></TT> | <TT><FONT COLOR=blue>downto</FONT></TT> ) <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>do</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>done</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>;</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>match</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>with</FONT></TT> <TT><I><FONT COLOR=maroon>pattern-matching</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>function</FONT></TT> <TT><I><FONT COLOR=maroon>pattern-matching</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>fun</FONT></TT> <TT><I><FONT COLOR=maroon>multiple-matching</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>try</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>with</FONT></TT> <TT><I><FONT COLOR=maroon>pattern-matching</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>let</FONT></TT> [<TT><FONT COLOR=blue>rec</FONT></TT>] <TT><I><FONT COLOR=maroon>let-binding</FONT></I></TT> { <TT><FONT COLOR=blue>and</FONT></TT> <TT><I><FONT COLOR=maroon>let-binding</FONT></I></TT> } <TT><FONT COLOR=blue>in</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>new</FONT></TT> <TT><I><FONT COLOR=maroon>class-path</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>#</FONT></TT> <TT><I><FONT COLOR=maroon>method-name</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>:></FONT></TT> <TT><I><FONT COLOR=maroon>typexpr</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>:</FONT></TT> <TT><I><FONT COLOR=maroon>typexpr</FONT></I></TT> <TT><FONT COLOR=blue>:></FONT></TT> <TT><I><FONT COLOR=maroon>typexpr</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>{<</FONT></TT> <TT><I><FONT COLOR=maroon>inst-var-name</FONT></I></TT> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> { <TT><FONT COLOR=blue>;</FONT></TT> <TT><I><FONT COLOR=maroon>inst-var-name</FONT></I></TT> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> } <TT><FONT COLOR=blue>>}</FONT></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP>
<TT><I><FONT COLOR=maroon>pattern-matching</FONT></I></TT></TD>
<TD ALIGN=right NOWRAP>::=</TD>
<TD ALIGN=left NOWRAP>
<TT><I><FONT COLOR=maroon>pattern</FONT></I></TT> [<TT><FONT COLOR=blue>when</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>] <TT><FONT COLOR=blue>-></FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>
{ <TT><FONT COLOR=blue>|</FONT></TT> <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT> [<TT><FONT COLOR=blue>when</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>] <TT><FONT COLOR=blue>-></FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> }</TD>
</TR>
<TR><TD ALIGN=right NOWRAP>
<TT><I><FONT COLOR=maroon>multiple-matching</FONT></I></TT></TD>
<TD ALIGN=right NOWRAP>::=</TD>
<TD ALIGN=left NOWRAP>
{ <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT> }<SUP><FONT SIZE=2>+</FONT></SUP> [<TT><FONT COLOR=blue>when</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>] <TT><FONT COLOR=blue>-></FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
</TR>
<TR><TD ALIGN=right NOWRAP>
<TT><I><FONT COLOR=maroon>let-binding</FONT></I></TT></TD>
<TD ALIGN=right NOWRAP>::=</TD>
<TD ALIGN=left NOWRAP>
<TT><I><FONT COLOR=maroon>pattern</FONT></I></TT> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><I><FONT COLOR=maroon>value-name</FONT></I></TT> { <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT> }<SUP><FONT SIZE=2>+</FONT></SUP> [<TT><FONT COLOR=blue>:</FONT></TT> <TT><I><FONT COLOR=maroon>typexpr</FONT></I></TT>] <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP>
<TT><I><FONT COLOR=maroon>infix-op</FONT></I></TT></TD>
<TD ALIGN=right NOWRAP>::=</TD>
<TD ALIGN=left NOWRAP>
<TT><I><FONT COLOR=maroon>infix-symbol</FONT></I></TT></TD>
</TR>
<TR><TD ALIGN=right NOWRAP> </TD>
<TD ALIGN=right NOWRAP>|</TD>
<TD ALIGN=left NOWRAP> <TT><FONT COLOR=blue>*</FONT></TT> | <TT><FONT COLOR=blue>=</FONT></TT> | <TT><FONT COLOR=blue>or</FONT></TT> | <TT><FONT COLOR=blue>&</FONT></TT></TD>
</TR></TABLE></DIV><BR>
The table below shows the relative precedences and associativity of
operators and non-closed constructions. The constructions with higher
precedence come first. For infix and prefix symbols, we write
``<TT>*</TT>...'' to mean ``any symbol starting with <TT>*</TT>''.
<A NAME="@manual.kwd31"></A><A NAME="@manual.kwd32"></A><A NAME="@manual.kwd33"></A><A NAME="@manual.kwd34"></A><A NAME="@manual.kwd35"></A><A NAME="@manual.kwd36"></A><A NAME="@manual.kwd37"></A><A NAME="@manual.kwd38"></A><BR>
<BR>
<DIV ALIGN=center>
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1 WIDTH="80%">
<TR><TD ALIGN=center NOWRAP><B>Construction or operator</B></TD>
<TD ALIGN=center NOWRAP><B>Associativity</B></TD>
</TR>
<TR><TD ALIGN=left NOWRAP>
prefix-symbol</TD>
<TD ALIGN=left NOWRAP>--</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>. .( .[</TT></TD>
<TD ALIGN=left NOWRAP>--</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>function application</TD>
<TD ALIGN=left NOWRAP>left</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>constructor application</TD>
<TD ALIGN=left NOWRAP>--</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>- -.</TT> (prefix)</TD>
<TD ALIGN=left NOWRAP>--</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>**</TT>...</TD>
<TD ALIGN=left NOWRAP>right</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>*</TT>...<TT> /</TT>...<TT> %</TT>...<TT> mod</TT></TD>
<TD ALIGN=left NOWRAP>left</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>+</TT>...<TT> -</TT>...</TD>
<TD ALIGN=left NOWRAP>left</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>::</TT></TD>
<TD ALIGN=left NOWRAP>right</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>@</TT>...<TT>^</TT>...</TD>
<TD ALIGN=left NOWRAP>right</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>comparisons (<TT>= == < </TT> etc.), all other infix symbols</TD>
<TD ALIGN=left NOWRAP>left</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>not</TT></TD>
<TD ALIGN=left NOWRAP>--</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>&</TT><TT> </TT><TT>&</TT><TT>&</TT></TD>
<TD ALIGN=left NOWRAP>left</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>or ||</TT></TD>
<TD ALIGN=left NOWRAP>left</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>,</TT></TD>
<TD ALIGN=left NOWRAP>--</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT><- :=</TT></TD>
<TD ALIGN=left NOWRAP>right</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>if</TT></TD>
<TD ALIGN=left NOWRAP>--</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>;</TT></TD>
<TD ALIGN=left NOWRAP>right</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>let match fun function try</TT></TD>
<TD ALIGN=left NOWRAP>--</TD>
</TR></TABLE></DIV><BR>
<H3>5.7.1 Basic expressions</H3>
<H4>Constants</H4>Expressions consisting in a constant evaluate to this constant.<BR>
<BR>
<H4>Value paths</H4> <A NAME="expr:var"></A>Expressions consisting in an access path evaluate to the value bound to
this path in the current evaluation environment. The path can
be either a value name or an access path to a value component of a module.<BR>
<BR>
<H4>Parenthesized expressions</H4>
<A NAME="@manual.kwd39"></A>
<A NAME="@manual.kwd40"></A>The expressions <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT> and <TT><FONT COLOR=blue>begin</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>end</FONT></TT> have the same
value as <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>. Both constructs are semantically equivalent, but it
is good style to use <TT><FONT COLOR=blue>begin</FONT></TT> ... <TT><FONT COLOR=blue>end</FONT></TT> inside control structures:
<PRE>
if ... then begin ... ; ... end else begin ... ; ... end
</PRE>
and <TT><FONT COLOR=blue>(</FONT></TT> ... <TT><FONT COLOR=blue>)</FONT></TT> for the other grouping situations.<BR>
<BR>
Parenthesized expressions can contain a type constraint, as in <TT><FONT COLOR=blue>(</FONT></TT>
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>:</FONT></TT> <TT><I><FONT COLOR=maroon>type</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT>. This constraint forces the type of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> to be
compatible with <TT><I><FONT COLOR=maroon>type</FONT></I></TT>.<BR>
<BR>
Parenthesized expressions can also contain coercions <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> [<TT><FONT COLOR=blue>:</FONT></TT> <TT><I><FONT COLOR=maroon>type</FONT></I></TT>] <TT><FONT COLOR=blue>:></FONT></TT> <TT><I><FONT COLOR=maroon>type</FONT></I></TT><TT><FONT COLOR=blue>)</FONT></TT> (see subsection <A HREF="manual013.html#s:objects">5.7.5</A> below).<BR>
<BR>
<H4>Function application</H4>Function application is denoted by juxtaposition of expressions. The
expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> ... <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> evaluates the expressions
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB>. The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> must evaluate to a
functional value, which is then applied to the values of
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>, ..., <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB>. The order in which the expressions <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB>, ...,
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> are evaluated is not specified.<BR>
<BR>
<H4>Function definition</H4>Two syntactic forms are provided to define functions. The first form
is introduced by the keyword <TT>function</TT>:
<A NAME="@manual.kwd41"></A><BR>
<BR>
<DIV ALIGN=center>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>function</FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>pattern</I></FONT></I><SUB><FONT SIZE=2>1</FONT></SUB></TD>
<TD ALIGN=left NOWRAP><TT><FONT COLOR=blue>-></FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>expr</I></FONT></I><SUB><FONT SIZE=2>1</FONT></SUB></TD>
</TR>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>|</FONT></TT></TD>
<TD ALIGN=left NOWRAP>...</TD>
</TR>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>|</FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>pattern</I></FONT></I><SUB><FONT SIZE=2><I>n</I></FONT></SUB></TD>
<TD ALIGN=left NOWRAP><TT><FONT COLOR=blue>-></FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>expr</I></FONT></I><SUB><FONT SIZE=2><I>n</I></FONT></SUB></TD>
</TR></TABLE></DIV>
This expression evaluates to a functional value with one argument.
When this function is applied to a value <I>v</I>, this value is
matched against each pattern <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB>.
If one of these matchings succeeds, that is, if the value <I>v</I>
matches the pattern <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> for some <I>i</I>,
then the expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> associated to the selected pattern
is evaluated, and its value becomes the value of the function
application. The evaluation of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> takes place in an
environment enriched by the bindings performed during the matching.<BR>
<BR>
If several patterns match the argument <I>v</I>, the one that occurs
first in the function definition is selected. If none of the patterns
matches the argument, the exception <TT>Match</TT><TT>_</TT><TT>failure</TT> is raised.
<A NAME="@manual0"></A><BR>The other form of function definition is introduced by the keyword <TT>fun</TT>:
<A NAME="@manual.kwd42"></A>
<DIV ALIGN=center>
<TT><FONT COLOR=blue>fun</FONT></TT> <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> ... <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>-></FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>
</DIV>
This expression is equivalent to:
<DIV ALIGN=center>
<TT><FONT COLOR=blue>function</FONT></TT> <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>-></FONT></TT> ... <TT><FONT COLOR=blue>function</FONT></TT> <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>-></FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>
</DIV>
That is, the <TT>fun</TT> expression above evaluates to a curried function
with <I>n</I> arguments: after applying this function <I>n</I> times to the
values <I>v</I><SUB><FONT SIZE=2>1</FONT></SUB> ... <I>v</I><SUB><FONT SIZE=2><I>m</I></FONT></SUB>, the values will be matched
in parallel against the patterns <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> ... <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB>.
If the matching succeeds, the function returns the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> in
an environment enriched by the bindings performed during the matchings.
If the matching fails, the exception <TT>Match</TT><TT>_</TT><TT>failure</TT> is raised.<BR>
<BR>
<H4>Guards in pattern-matchings</H4><A NAME="@manual.kwd43"></A>
Cases of a pattern matching (in the <TT>function</TT>, <TT>fun</TT>, <TT>match</TT> and
<TT>try</TT> constructs) can include guard expressions, which are
arbitrary boolean expressions that must evaluate to <TT>true</TT> for the
match case to be selected. Guards occur just before the <TT>-></TT> token and
are introduced by the <TT>when</TT> keyword:<BR>
<BR>
<DIV ALIGN=center>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>function</FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>pattern</I></FONT></I><SUB><FONT SIZE=2>1</FONT></SUB> [<TT><FONT COLOR=blue>when</FONT></TT> <I><FONT COLOR=maroon><I>cond</I></FONT></I><SUB><FONT SIZE=2>1</FONT></SUB>]</TD>
<TD ALIGN=left NOWRAP><TT><FONT COLOR=blue>-></FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>expr</I></FONT></I><SUB><FONT SIZE=2>1</FONT></SUB></TD>
</TR>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>|</FONT></TT></TD>
<TD ALIGN=left NOWRAP>...</TD>
</TR>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>|</FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>pattern</I></FONT></I><SUB><FONT SIZE=2><I>n</I></FONT></SUB> [<TT><FONT COLOR=blue>when</FONT></TT> <I><FONT COLOR=maroon><I>cond</I></FONT></I><SUB><FONT SIZE=2><I>n</I></FONT></SUB>]</TD>
<TD ALIGN=left NOWRAP><TT><FONT COLOR=blue>-></FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>expr</I></FONT></I><SUB><FONT SIZE=2><I>n</I></FONT></SUB></TD>
</TR></TABLE></DIV><BR>
Matching proceeds as described before, except that if the value
matches some pattern <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> which has a guard <TT><I><FONT COLOR=maroon>cond</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB>, then the
expression <TT><I><FONT COLOR=maroon>cond</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> is evaluated (in an environment enriched by the
bindings performed during matching). If <TT><I><FONT COLOR=maroon>cond</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> evaluates to <TT>true</TT>,
then <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> is evaluated and its value returned as the result of the
matching, as usual. But if <TT><I><FONT COLOR=maroon>cond</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> evaluates to <TT>false</TT>, the matching
is resumed against the patterns following <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB>.<BR>
<BR>
<H4>Local definitions</H4> <A NAME="s:localdef"></A><A NAME="@manual.kwd44"></A>The <TT>let</TT> and <TT>let rec</TT> constructs bind value names locally.
The construct
<DIV ALIGN=center>
<TT><FONT COLOR=blue>let</FONT></TT> <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>and</FONT></TT> ... <TT><FONT COLOR=blue>and</FONT></TT> <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>in</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>
</DIV>
evaluates <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> ... <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> in some unspecified order, then matches
their values against the patterns <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> ... <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB>. If the
matchings succeed, <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> is evaluated in the environment enriched by
the bindings performed during matching, and the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> is
returned as the value of the whole <TT>let</TT> expression. If one of the
matchings fails, the exception <TT>Match</TT><TT>_</TT><TT>failure</TT> is raised.
<A NAME="@manual1"></A><BR>
<BR>
An alternate syntax is provided to bind variables to functional
values: instead of writing
<DIV ALIGN=center>
<TT><FONT COLOR=blue>let</FONT></TT> <TT><I><FONT COLOR=maroon>ident</FONT></I></TT> <TT><FONT COLOR=blue>=</FONT></TT> <TT><FONT COLOR=blue>fun</FONT></TT> <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> ... <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>m</I></FONT></SUB> <TT><FONT COLOR=blue>-></FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>
</DIV>
in a <TT>let</TT> expression, one may instead write
<DIV ALIGN=center>
<TT><FONT COLOR=blue>let</FONT></TT> <TT><I><FONT COLOR=maroon>ident</FONT></I></TT> <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> ... <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>m</I></FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>
</DIV><BR>Recursive definitions of names are introduced by <TT>let rec</TT>:
<DIV ALIGN=center>
<TT><FONT COLOR=blue>let</FONT></TT> <TT><FONT COLOR=blue>rec</FONT></TT> <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>and</FONT></TT> ... <TT><FONT COLOR=blue>and</FONT></TT> <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB>
<TT><FONT COLOR=blue>in</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>
</DIV>
The only difference with the <TT>let</TT> construct described above is
that the bindings of names to values performed by the
pattern-matching are considered already performed when the expressions
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> are evaluated. That is, the expressions <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB>
to <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> can reference identifiers that are bound by one of the
patterns <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB>, ..., <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB>, and expect them to have the
same value as in <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>, the body of the <TT>let rec</TT> construct.<BR>
<BR>
The recursive definition is guaranteed to behave as described above if
the expressions <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> are function definitions
(<TT><FONT COLOR=blue>fun</FONT></TT> ... or <TT><FONT COLOR=blue>function</FONT></TT> ...), and the patterns <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB>
... <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> are just value names, as in:
<DIV ALIGN=center>
<TT><FONT COLOR=blue>let</FONT></TT> <TT><FONT COLOR=blue>rec</FONT></TT> <TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><FONT COLOR=blue>fun</FONT></TT> ...
<TT><FONT COLOR=blue>and</FONT></TT> ...
<TT><FONT COLOR=blue>and</FONT></TT> <TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><FONT COLOR=blue>fun</FONT></TT> ...
<TT><FONT COLOR=blue>in</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>
</DIV>
This defines <TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> ... <TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> as mutually recursive functions
local to <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>. <BR>
<BR>
The behavior of other forms of <TT>let rec</TT> definitions is
implementation-dependent. The current implementation also supports
a certain class of recursive definitions of non-functional values,
such as
<DIV ALIGN=center>
<TT><FONT COLOR=blue>let</FONT></TT> <TT><FONT COLOR=blue>rec</FONT></TT> <TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><FONT COLOR=blue>1</FONT></TT> <TT><FONT COLOR=blue>::</FONT></TT> <TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>
<TT><FONT COLOR=blue>and</FONT></TT> <TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><FONT COLOR=blue>2</FONT></TT> <TT><FONT COLOR=blue>::</FONT></TT> <TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB>
<TT><FONT COLOR=blue>in</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>
</DIV>
which binds <TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to the cyclic list <TT>1::2::1::2::</TT>..., and
<TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> to the cyclic list <TT>2::1::2::1::</TT>...Informally, the class of accepted definitions consists of those
definitions where the defined names occur only inside function
bodies or as argument to a data constructor.<BR>
<BR>
<H3>5.7.2 Control structures</H3>
<H4>Sequence</H4>The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>;</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> evaluates <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> first, then
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>, and returns the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>.<BR>
<BR>
<H4>Conditional</H4>
<A NAME="@manual.kwd45"></A>The expression <TT><FONT COLOR=blue>if</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>then</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>else</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>3</FONT></SUB> evaluates to
the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> if <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> evaluates to the boolean <TT><FONT COLOR=blue>true</FONT></TT>,
and to the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>3</FONT></SUB> if <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> evaluates to the boolean
<TT><FONT COLOR=blue>false</FONT></TT>.<BR>
<BR>
The <TT><FONT COLOR=blue>else</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>3</FONT></SUB> part can be omitted, in which case it defaults to
<TT><FONT COLOR=blue>else</FONT></TT> <TT><FONT COLOR=blue>()</FONT></TT>.<BR>
<BR>
<H4>Case expression</H4><A NAME="@manual.kwd46"></A>The expression
<DIV ALIGN=center>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>match</FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>expr</I></FONT></I></TD>
</TR>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>with</FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>pattern</I></FONT></I><SUB><FONT SIZE=2>1</FONT></SUB></TD>
<TD ALIGN=left NOWRAP><TT><FONT COLOR=blue>-></FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>expr</I></FONT></I><SUB><FONT SIZE=2>1</FONT></SUB></TD>
</TR>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>|</FONT></TT></TD>
<TD ALIGN=left NOWRAP>...</TD>
</TR>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>|</FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>pattern</I></FONT></I><SUB><FONT SIZE=2><I>n</I></FONT></SUB></TD>
<TD ALIGN=left NOWRAP><TT><FONT COLOR=blue>-></FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>expr</I></FONT></I><SUB><FONT SIZE=2><I>n</I></FONT></SUB></TD>
</TR></TABLE></DIV>
matches the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> against the patterns <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to
<TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB>. If the matching against <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> succeeds, the
associated expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> is evaluated, and its value becomes the
value of the whole <TT><FONT COLOR=blue>match</FONT></TT> expression. The evaluation of
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> takes place in an environment enriched by the bindings
performed during matching. If several patterns match the value of
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT>, the one that occurs first in the <TT><FONT COLOR=blue>match</FONT></TT> expression is
selected. If none of the patterns match the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>, the
exception <TT><FONT COLOR=blue>Match_failure</FONT></TT> is raised.
<A NAME="@manual2"></A><BR>
<BR>
<H4>Boolean operators</H4>The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>&&</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> evaluates to <TT><FONT COLOR=blue>true</FONT></TT> if both
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> and <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> evaluate to <TT><FONT COLOR=blue>true</FONT></TT>; otherwise, it evaluates to
<TT><FONT COLOR=blue>false</FONT></TT>. The first component, <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB>, is evaluated first. The
second component, <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>, is not evaluated if the first component
evaluates to <TT><FONT COLOR=blue>false</FONT></TT>. Hence, the expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>&&</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> behaves
exactly as
<DIV ALIGN=center>
<TT><FONT COLOR=blue>if</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>then</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>else</FONT></TT> <TT><FONT COLOR=blue>false</FONT></TT>.
</DIV><BR>
The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>||</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> evaluates to <TT><FONT COLOR=blue>true</FONT></TT> if one of
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> and <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> evaluates to <TT><FONT COLOR=blue>true</FONT></TT>; otherwise, it evaluates to
<TT><FONT COLOR=blue>false</FONT></TT>. The first component, <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB>, is evaluated first. The
second component, <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>, is not evaluated if the first component
evaluates to <TT><FONT COLOR=blue>true</FONT></TT>. Hence, the expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>||</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> behaves
exactly as
<DIV ALIGN=center>
<TT><FONT COLOR=blue>if</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>then</FONT></TT> <TT><FONT COLOR=blue>true</FONT></TT> <TT><FONT COLOR=blue>else</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>.
</DIV><A NAME="@manual.kwd47"></A><BR>
The boolean operator <TT><FONT COLOR=blue>&</FONT></TT> is synonymous for <TT><FONT COLOR=blue>&&</FONT></TT>. The boolean operator
<TT><FONT COLOR=blue>or</FONT></TT> is synonymous for <TT><FONT COLOR=blue>||</FONT></TT>.<BR>
<BR>
<H4>Loops</H4><A NAME="@manual.kwd48"></A>
The expression <TT><FONT COLOR=blue>while</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>do</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>done</FONT></TT> repeatedly
evaluates <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> while <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> evaluates to <TT><FONT COLOR=blue>true</FONT></TT>. The loop
condition <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> is evaluated and tested at the beginning of each
iteration. The whole <TT><FONT COLOR=blue>while</FONT></TT> ... <TT><FONT COLOR=blue>done</FONT></TT> expression evaluates to
the unit value <TT><FONT COLOR=blue>()</FONT></TT>.<A NAME="@manual.kwd49"></A><BR>
<BR>
The expression <TT><FONT COLOR=blue>for</FONT></TT> <TT><I><FONT COLOR=maroon>name</FONT></I></TT> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>to</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>do</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>3</FONT></SUB> <TT><FONT COLOR=blue>done</FONT></TT>
first evaluates the expressions <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> and <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> (the boundaries)
into integer values <I>n</I> and <I>p</I>. Then, the loop body <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>3</FONT></SUB> is
repeatedly evaluated in an environment where <TT><I><FONT COLOR=maroon>name</FONT></I></TT> is successively
bound to the values
<I>n</I>, <I>n</I>+1, ..., <I>p</I>-1, <I>p</I>.
The loop body is never evaluated if <I>n</I> > <I>p</I>.<BR>
<BR>
The expression <TT><FONT COLOR=blue>for</FONT></TT> <TT><I><FONT COLOR=maroon>name</FONT></I></TT> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>downto</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>do</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>3</FONT></SUB> <TT><FONT COLOR=blue>done</FONT></TT>
evaluates similarly, except that <TT><I><FONT COLOR=maroon>name</FONT></I></TT> is successively bound to the values
<I>n</I>, <I>n</I>-1, ..., <I>p</I>+1, <I>p</I>.
The loop body is never evaluated if <I>n</I> < <I>p</I>.<BR>
<BR>
In both cases, the whole <TT><FONT COLOR=blue>for</FONT></TT> expression evaluates to the unit
value <TT><FONT COLOR=blue>()</FONT></TT>.<BR>
<BR>
<H4>Exception handling</H4>
<A NAME="@manual.kwd50"></A>The expression
<DIV ALIGN=center>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>try </FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>expr</I></FONT></I></TD>
</TR>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>with</FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>pattern</I></FONT></I><SUB><FONT SIZE=2>1</FONT></SUB></TD>
<TD ALIGN=left NOWRAP><TT><FONT COLOR=blue>-></FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>expr</I></FONT></I><SUB><FONT SIZE=2>1</FONT></SUB></TD>
</TR>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>|</FONT></TT></TD>
<TD ALIGN=left NOWRAP>...</TD>
</TR>
<TR><TD ALIGN=right NOWRAP><TT><FONT COLOR=blue>|</FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>pattern</I></FONT></I><SUB><FONT SIZE=2><I>n</I></FONT></SUB></TD>
<TD ALIGN=left NOWRAP><TT><FONT COLOR=blue>-></FONT></TT></TD>
<TD ALIGN=left NOWRAP><I><FONT COLOR=maroon><I>expr</I></FONT></I><SUB><FONT SIZE=2><I>n</I></FONT></SUB></TD>
</TR></TABLE></DIV>
evaluates the expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> and returns its value if the
evaluation of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> does not raise any exception. If the evaluation
of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> raises an exception, the exception value is matched against
the patterns <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to <TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB>. If the matching against
<TT><I><FONT COLOR=maroon>pattern</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> succeeds, the associated expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> is evaluated,
and its value becomes the value of the whole <TT><FONT COLOR=blue>try</FONT></TT> expression. The
evaluation of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> takes place in an environment enriched by the
bindings performed during matching. If several patterns match the value of
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT>, the one that occurs first in the <TT><FONT COLOR=blue>try</FONT></TT> expression is
selected. If none of the patterns matches the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>, the
exception value is raised again, thereby transparently ``passing
through'' the <TT><FONT COLOR=blue>try</FONT></TT> construct.<BR>
<BR>
<H3>5.7.3 Operations on data structures</H3>
<H4>Products</H4>The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>,</FONT></TT> ... <TT><FONT COLOR=blue>,</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> evaluates to the
<I>n</I>-tuple of the values of expressions <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB>. The
evaluation order for the subexpressions is not specified.<BR>
<BR>
<H4>Variants</H4>The expression <TT><I><FONT COLOR=maroon>ncconstr</FONT></I></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> evaluates to the variant value whose
constructor is <TT><I><FONT COLOR=maroon>ncconstr</FONT></I></TT>, and whose argument is the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>.<BR>
<BR>
For lists, some syntactic sugar is provided. The expression
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>::</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> stands for the constructor <TT><FONT COLOR=blue>(</FONT></TT> <TT><FONT COLOR=blue>::</FONT></TT> <TT><FONT COLOR=blue>)</FONT></TT>
applied to the argument <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>,</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>)</FONT></TT>, and therefore
evaluates to the list whose head is the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> and whose tail
is the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>. The expression <TT><FONT COLOR=blue>[</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>;</FONT></TT> ... <TT><FONT COLOR=blue>;</FONT></TT>
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>]</FONT></TT> is equivalent to <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>::</FONT></TT> ... <TT><FONT COLOR=blue>::</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>::</FONT></TT>
<TT><FONT COLOR=blue>[]</FONT></TT>, and therefore evaluates to the list whose elements are the
values of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB>.<BR>
<BR>
<H4>Records</H4>The expression <TT><FONT COLOR=blue>{</FONT></TT> <TT><I><FONT COLOR=maroon>label</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>;</FONT></TT> ... <TT><FONT COLOR=blue>;</FONT></TT> <TT><I><FONT COLOR=maroon>label</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT>
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>}</FONT></TT> evaluates to the record value
<TT><FONT COLOR=blue>{</FONT></TT> <TT><I><FONT COLOR=maroon>label</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>v</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>;</FONT></TT> ... <TT><FONT COLOR=blue>;</FONT></TT> <TT><I><FONT COLOR=maroon>label</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>v</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>}</FONT></TT>,
where <TT><I><FONT COLOR=maroon>v</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> is the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>i</I></FONT></SUB> for <I>i</I> = 1,... , <I>n</I>.
The labels <TT><I><FONT COLOR=maroon>label</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to <TT><I><FONT COLOR=maroon>label</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> must all belong to the same record
types; all labels belonging to this record type must appear exactly
once in the record expression, though they can appear in any
order. The order in which <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> are evaluated is not
specified.<BR>
<BR>
The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>.</FONT></TT> <TT><I><FONT COLOR=maroon>label</FONT></I></TT> evaluates <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to a record
value, and returns the value associated to <TT><I><FONT COLOR=maroon>label</FONT></I></TT> in this record
value.<BR>
<BR>
The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>.</FONT></TT> <TT><I><FONT COLOR=maroon>label</FONT></I></TT> <TT><FONT COLOR=blue><-</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> evaluates <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to a record
value, which is then modified in-place by replacing the value
associated to <TT><I><FONT COLOR=maroon>label</FONT></I></TT> in this record by the value of
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>. This operation is permitted only if <TT><I><FONT COLOR=maroon>label</FONT></I></TT> has been
declared <TT><FONT COLOR=blue>mutable</FONT></TT> in the definition of the record type. The whole
expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>.</FONT></TT> <TT><I><FONT COLOR=maroon>label</FONT></I></TT> <TT><FONT COLOR=blue><-</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> evaluates to the unit value
<TT><FONT COLOR=blue>()</FONT></TT>.<BR>
<BR>
<H4>Arrays</H4>The expression <TT><FONT COLOR=blue>[|</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>;</FONT></TT> ... <TT><FONT COLOR=blue>;</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> <TT><FONT COLOR=blue>|]</FONT></TT> evaluates to
a <I>n</I>-element array, whose elements are initialized with the values of
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB> respectively. The order in which these
expressions are evaluated is unspecified.<BR>
<BR>
The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>.(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>)</FONT></TT> returns the value of element
number <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> in the array denoted by <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB>. The first element
has number 0; the last element has number <I>n</I>-1, where <I>n</I> is the
size of the array. The exception <TT>Invalid</TT><TT>_</TT><TT>argument</TT> is raised if the
access is out of bounds.<BR>
<BR>
The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>.(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>)</FONT></TT> <TT><FONT COLOR=blue><-</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>3</FONT></SUB> modifies in-place
the array denoted by <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB>, replacing element number <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> by
the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>3</FONT></SUB>. The exception <TT>Invalid</TT><TT>_</TT><TT>argument</TT> is raised if
the access is out of bounds. The value of the whole expression is <TT><FONT COLOR=blue>()</FONT></TT>.<BR>
<BR>
<H4>Strings</H4>The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>.[</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>]</FONT></TT> returns the value of character
number <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> in the string denoted by <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB>. The first character
has number 0; the last character has number <I>n</I>-1, where <I>n</I> is the
length of the string. The exception <TT>Invalid</TT><TT>_</TT><TT>argument</TT> is raised if the
access is out of bounds.<BR>
<BR>
The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>.[</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>]</FONT></TT> <TT><FONT COLOR=blue><-</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>3</FONT></SUB> modifies in-place
the string denoted by <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB>, replacing character number <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> by
the value of <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>3</FONT></SUB>. The exception <TT>Invalid</TT><TT>_</TT><TT>argument</TT> is raised if
the access is out of bounds. The value of the whole expression is <TT><FONT COLOR=blue>()</FONT></TT>.<BR>
<BR>
<H3>5.7.4 Operators</H3>Symbols from the class <TT><FONT COLOR=blue>infix-symbols</FONT></TT>, as well as the keywords
<TT>*</TT>, <TT>=</TT>, <TT>or</TT> and <TT>&</TT>, can appear in infix position (between two
expressions). Symbols from the class <TT><FONT COLOR=blue>prefix-symbols</FONT></TT>
can appear in prefix position (in front of an expression).<BR>
<BR>
Infix and prefix symbols do not have a fixed meaning: they are simply
interpreted as applications of functions bound to the names
corresponding to the symbols. The expression <TT><I><FONT COLOR=maroon>prefix-symbol</FONT></I></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> is
interpreted as the application <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>prefix-symbol</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT>
<TT><I><FONT COLOR=maroon>expr</FONT></I></TT>. Similarly, the expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><I><FONT COLOR=maroon>infix-symbol</FONT></I></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> is
interpreted as the application <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>infix-symbol</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>.<BR>
<BR>
The table below lists the symbols defined in the initial environment
and their initial meaning. (See the description of the standard
library module <TT>Pervasive</TT> in chapter <A HREF="manual029.html#c:stdlib">16</A> for more
details). Their meaning may be changed at any time using
<TT><FONT COLOR=blue>let</FONT></TT> <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>infix-op</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT> <TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><I><FONT COLOR=maroon>name</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>=</FONT></TT> ...<BR>
<BR>
<BR>
<BR>
<DIV ALIGN=center>
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1 WIDTH="80%">
<TR><TD ALIGN=center NOWRAP><B>Operator</B></TD>
<TD ALIGN=center NOWRAP><B>Initial meaning</B></TD>
</TR>
<TR><TD ALIGN=left NOWRAP>
<TT>+</TT></TD>
<TD VALIGN=top ALIGN=left>Integer addition.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>-</TT> (infix)</TD>
<TD VALIGN=top ALIGN=left>Integer subtraction.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>-</TT> (prefix)</TD>
<TD VALIGN=top ALIGN=left>Integer negation.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>*</TT></TD>
<TD VALIGN=top ALIGN=left>Integer multiplication.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>/</TT></TD>
<TD VALIGN=top ALIGN=left>Integer division.
Raise <TT>Division</TT><TT>_</TT><TT>by</TT><TT>_</TT><TT>zero</TT> if second argument is zero. The result is
unspecified if either argument is negative.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>mod</TT></TD>
<TD VALIGN=top ALIGN=left>Integer modulus. Raise
<TT>Division</TT><TT>_</TT><TT>by</TT><TT>_</TT><TT>zero</TT> if second argument is zero. The result is
unspecified if either argument is negative.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>land</TT></TD>
<TD VALIGN=top ALIGN=left>Bitwise logical ``and'' on integers.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>lor</TT></TD>
<TD VALIGN=top ALIGN=left>Bitwise logical ``or'' on integers.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>lxor</TT></TD>
<TD VALIGN=top ALIGN=left>Bitwise logical ``exclusive or'' on integers.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>lsl</TT></TD>
<TD VALIGN=top ALIGN=left>Bitwise logical shift left on integers.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>lsr</TT></TD>
<TD VALIGN=top ALIGN=left>Bitwise logical shift right on integers.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>asr</TT></TD>
<TD VALIGN=top ALIGN=left>Bitwise arithmetic shift right on integers.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>+.</TT></TD>
<TD VALIGN=top ALIGN=left>Floating-point addition.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>-.</TT> (infix)</TD>
<TD VALIGN=top ALIGN=left>Floating-point subtraction.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>-.</TT> (prefix)</TD>
<TD VALIGN=top ALIGN=left>Floating-point negation.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>*.</TT></TD>
<TD VALIGN=top ALIGN=left>Floating-point multiplication.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>/.</TT></TD>
<TD VALIGN=top ALIGN=left>Floating-point division.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>**</TT></TD>
<TD VALIGN=top ALIGN=left>Floating-point exponentiation.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>@</TT> </TD>
<TD VALIGN=top ALIGN=left>List concatenation.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>^</TT> </TD>
<TD VALIGN=top ALIGN=left>String concatenation.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>!</TT> </TD>
<TD VALIGN=top ALIGN=left>Dereferencing (return the current
contents of a reference).</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>:=</TT></TD>
<TD VALIGN=top ALIGN=left>Reference assignment (update the
reference given as first argument with the value of the second
argument).</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>=</TT> </TD>
<TD VALIGN=top ALIGN=left>Structural equality test.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT><></TT> </TD>
<TD VALIGN=top ALIGN=left>Structural inequality test.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>==</TT> </TD>
<TD VALIGN=top ALIGN=left>Physical equality test.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>!=</TT> </TD>
<TD VALIGN=top ALIGN=left>Physical inequality test.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT><</TT> </TD>
<TD VALIGN=top ALIGN=left>Test ``less than''.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT><=</TT> </TD>
<TD VALIGN=top ALIGN=left>Test ``less than or equal''.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>></TT> </TD>
<TD VALIGN=top ALIGN=left>Test ``greater than''.</TD>
</TR>
<TR><TD ALIGN=left NOWRAP><TT>>=</TT> </TD>
<TD VALIGN=top ALIGN=left>Test ``greater than or equal''.</TD>
</TR></TABLE></DIV><BR>
<H3>5.7.5 Objects</H3>
<H4>Object creation</H4> <A NAME="s:objects"></A><A NAME="@manual.kwd51"></A>When <TT><I><FONT COLOR=maroon>class-path</FONT></I></TT> evaluates to a class body, <TT><FONT COLOR=blue>new</FONT></TT> <TT><I><FONT COLOR=maroon>class-path</FONT></I></TT>
evaluates to an object containing the instance variables and
methods of this class.<BR>
<BR>
When <TT><I><FONT COLOR=maroon>class-path</FONT></I></TT> evaluates to a class function, <TT><FONT COLOR=blue>new</FONT></TT> <TT><I><FONT COLOR=maroon>class-path</FONT></I></TT>
evaluates to a function expecting the same number of arguments and
returning a new object of this class.<BR>
<BR>
<H4>Message sending</H4>The expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>#</FONT></TT> <TT><I><FONT COLOR=maroon>method-name</FONT></I></TT> invokes the method
<TT><I><FONT COLOR=maroon>method-name</FONT></I></TT> of the object denoted by <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>.<BR>
<BR>
<H4>Coercion</H4>The type of an object can be coerced (weakened) to a supertype.
The expression <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>:></FONT></TT> <TT><I><FONT COLOR=maroon>typexpr</FONT></I></TT> <TT><FONT COLOR=blue>)</FONT></TT> coerces the expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>
to type <TT><I><FONT COLOR=maroon>typexpr</FONT></I></TT>.
The expression <TT><FONT COLOR=blue>(</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> <TT><FONT COLOR=blue>:</FONT></TT> <TT><I><FONT COLOR=maroon>typexpr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> <TT><FONT COLOR=blue>:></FONT></TT> <TT><I><FONT COLOR=maroon>typexpr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> <TT><FONT COLOR=blue>)</FONT></TT> coerces the
expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> from type <TT><I><FONT COLOR=maroon>typexpr</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to type <TT><I><FONT COLOR=maroon>typexpr</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>.
The former operator will sometimes fail to coerce an expression <TT><I><FONT COLOR=maroon>expr</FONT></I></TT>
from a type <TT><I><FONT COLOR=maroon>t</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> to a type <TT><I><FONT COLOR=maroon>t</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB> even if type <TT><I><FONT COLOR=maroon>t</FONT></I></TT><SUB><FONT SIZE=2>1</FONT></SUB> is a subtype of type
<TT><I><FONT COLOR=maroon>t</FONT></I></TT><SUB><FONT SIZE=2>2</FONT></SUB>. In this case, the latter operator should be used.<BR>
<BR>
In a class definition, coercion to the type this class defines is the
identity, as this type abbreviation is not yet completely defined.<BR>
<BR>
<H4>Object duplication</H4>An object can be duplicated using the library function <TT>Oo.copy</TT>
(see section <A HREF="manual047.html#s:Oo">17.17</A>). Inside a method, the expression
<TT><FONT COLOR=blue>{<</FONT></TT> <TT><I><FONT COLOR=maroon>inst-var-name</FONT></I></TT> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> { <TT><FONT COLOR=blue>;</FONT></TT> <TT><I><FONT COLOR=maroon>inst-var-name</FONT></I></TT> <TT><FONT COLOR=blue>=</FONT></TT> <TT><I><FONT COLOR=maroon>expr</FONT></I></TT> } <TT><FONT COLOR=blue>>}</FONT></TT>
returns a copy of self with the given instance variables replaced by
the values of the associated expressions; other instance variables
have the same value in the returned object as in self.<BR>
<BR>
<BR>
<BR>
<HR>
<A HREF="manual012.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual014.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<A HREF="manual006.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
</BODY>
</HTML>
|