Differences From Artifact [33d07971634f6989]:
- File        
index.dd
- 2010-11-27 15:49:30 - part of checkin [6de3d8df3a] on branch trunk - reference manual completed (user: kinaba) [annotate]
 
 
To Artifact [a39b25f2bef916f0]:
- File        
index.dd
- 2010-11-27 23:46:51 - part of checkin [576c494e53] on branch trunk - fixed: literal "..." is now lifted in user-defined layers (user: kinaba) [annotate]
 
 
    13     13   <p>
    14     14   あと、 やたらとマクロの章が長くなっていますが、 この部分は、
    15     15   レイヤ機能を入れたら自動的にすごく自然にマクロが入るなーと思って、
    16     16   おまけで実装してみた程度のものです。
    17     17   あんまり重要ではないので、適当にスルーして下さいませ。
    18     18   単に、適当に入れたら適当で微妙な部分が多く残ってしまったので注意書きが増えているだけで…。
    19     19   </p>
           20  +<p>
           21  +言い訳ついでにもう一つ言い訳ですが、この言語は、少なくとも今のところ、
           22  +実用に使うことを考えた設計にはなっていません。どちらかというと、
           23  +Brainfuck や Unlambda や Whitespace の仲間と思ってお使い下さい。
           24  +</p>
    20     25   
    21     26   $(DDOC_MEMBERS
    22     27   
    23     28   $(SECTION Syntax, $(SECBODY
    24     29   <p>
    25     30   文法について。
    26     31   字句解析がわりと適当なので、
................................................................................
   519    524   </p>
   520    525   <pre>
   521    526       @@type = fun(x) {
   522    527          if( _isint(x) ) then "int"
   523    528          else if( _isstr(x) ) then "str"
   524    529          else if( _isbot(x) ) then "runtime error"
   525    530          else "type error"
   526         -    }
          531  +    };
   527    532   </pre>
   528    533   <pre>
   529    534       >> @type( 1 )
   530    535       int
   531    536       >> @type( 2 )
   532    537       int
   533    538       >> @type( "foo" )
................................................................................
   568    573   </p>
   569    574   <pre>
   570    575      @type "if" (c, t, e) {@value(
   571    576         if( @type(c)=="int" || @type(c)=="runtime error" ) then
   572    577            @type( int_int_int(t(), e()) )
   573    578         else
   574    579            "type error"
   575         -   )}
          580  +   )};
   576    581   </pre>
   577    582   <p>
   578    583   関数が自動リフトされるので、フィボナッチ関数の型を調べることができます。
   579    584   </p>
   580    585   <pre>
   581    586      >> def fib(x) { if x<2 then 1 else fib(x-1)+fib(x-2) };
   582    587      >> @type( fib(100000000000000) )