[BACK]Return to asir.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-doc / parts

Diff for /OpenXM/src/asir-doc/parts/asir.texi between version 1.4 and 1.6

version 1.4, 2000/01/26 01:37:32 version 1.6, 2002/09/03 01:50:57
Line 1 
Line 1 
 @comment $OpenXM: OpenXM/src/asir-doc/parts/asir.texi,v 1.3 1999/12/21 02:47:31 noro Exp $  @comment $OpenXM: OpenXM/src/asir-doc/parts/asir.texi,v 1.5 2000/09/23 07:53:24 noro Exp $
 \BJP  \BJP
 @node $B%f!<%68@8l(B Asir,,, Top  @node $B%f!<%68@8l(B Asir,,, Top
 @chapter $B%f!<%68@8l(B Asir  @chapter $B%f!<%68@8l(B Asir
Line 254  comprehensible than use of structure like C programs.
Line 254  comprehensible than use of structure like C programs.
 * return $BJ8(B::  * return $BJ8(B::
 * if $BJ8(B::  * if $BJ8(B::
 * $B%k!<%W(B break return continue::  * $B%k!<%W(B break return continue::
   * $B9=B$BNDj5A(B::
 * $B$5$^$6$^$J<0(B::  * $B$5$^$6$^$J<0(B::
 * $B%W%j%W%m%;%C%5(B::  * $B%W%j%W%m%;%C%5(B::
 * $B%*%W%7%g%s;XDj(B::  * $B%*%W%7%g%s;XDj(B::
Line 267  comprehensible than use of structure like C programs.
Line 268  comprehensible than use of structure like C programs.
 * return statement::  * return statement::
 * if statement::  * if statement::
 * loop break return continue::  * loop break return continue::
   * structure definition::
 * various expressions::  * various expressions::
 * preprocessor::  * preprocessor::
 * option::  * option::
Line 574  def afo(X) @{
Line 576  def afo(X) @{
 @samp{/*} $B$,$$$/$D$"$C$F$b:G=i$N$b$N$N$_$,M-8z$H$J$j(B, $B:G=i$K8=$l$?(B  @samp{/*} $B$,$$$/$D$"$C$F$b:G=i$N$b$N$N$_$,M-8z$H$J$j(B, $B:G=i$K8=$l$?(B
 @samp{*/} $B$G%3%a%s%H$O=*N;$7$?$H8+$J$5$l$k(B. $B%W%m%0%i%`$J$I$G(B, $B%3%a%s%H(B  @samp{*/} $B$G%3%a%s%H$O=*N;$7$?$H8+$J$5$l$k(B. $B%W%m%0%i%`$J$I$G(B, $B%3%a%s%H(B
 $B$r4^$`2DG=@-$,$"$kItJ,$r%3%a%s%H%"%&%H$7$?>l9g$K$O(B, @code{#if 0},  $B$r4^$`2DG=@-$,$"$kItJ,$r%3%a%s%H%"%&%H$7$?>l9g$K$O(B, @code{#if 0},
 @code{#endif}$B$r;H$($P$h$$(B. (@xref{$B%W%j%W%m%;%C%5(B})  @code{#endif}$B$r;H$($P$h$$(B. (@xref{$B%W%j%W%m%;%C%5(B}.)
 \E  \E
 \BEG  \BEG
 A comment can span to several lines, but it cannot be nested.  A comment can span to several lines, but it cannot be nested.
Line 583  in the subsequent text exist, and the comment terminat
Line 585  in the subsequent text exist, and the comment terminat
 @samp{*/}.  @samp{*/}.
   
 In order to comment out a program part that may contain comments in it,  In order to comment out a program part that may contain comments in it,
 use the pair, @code{#if 0} and @code{#endif}. (@xref{preprocessor})  use the pair, @code{#if 0} and @code{#endif}. (@xref{preprocessor}.)
 \E  \E
   
 @example  @example
Line 650  S = sum(N);
Line 652  S = sum(N);
 \BJP  \BJP
 $B$N$h$&$K(B, $B<0$K=*C<5-9f(B (@samp{;} $B$^$?$O(B @samp{$}) $B$r$D$1$?$b$N$G$"$k(B.  $B$N$h$&$K(B, $B<0$K=*C<5-9f(B (@samp{;} $B$^$?$O(B @samp{$}) $B$r$D$1$?$b$N$G$"$k(B.
 $B$3$NC1J85Z$SN`;w$N(B @code{return} $BJ8(B, @code{break} $BJ8$J$I$,J8$N:G>.9=@.(B  $B$3$NC1J85Z$SN`;w$N(B @code{return} $BJ8(B, @code{break} $BJ8$J$I$,J8$N:G>.9=@.(B
 $BC10L$H$J$k(B. @code{if} $BJ8$d(B @code{for} $BJ8$NDj5A(B (@xref{$BJ8K!$N>\:Y(B}) $B$r8+$l(B  $BC10L$H$J$k(B. @code{if} $BJ8$d(B @code{for} $BJ8$NDj5A(B (@ref{$BJ8K!$N>\:Y(B}) $B$r8+$l(B
 $B$P$o$+$kDL$j(B, $B$=$l$i$NK\BN$O(B, $BC1$J$k0l$D$NJ8$H$7$FDj5A$5$l$F$$$k(B. $BDL>o(B  $B$P$o$+$kDL$j(B, $B$=$l$i$NK\BN$O(B, $BC1$J$k0l$D$NJ8$H$7$FDj5A$5$l$F$$$k(B. $BDL>o(B
 $B$O(B, $BK\BN$K$OJ#?t$NJ8$,=q$1$k$3$H$,I,MW$H$J$k(B.  $B$3$N$h$&$J>l9g(B,  $B$O(B, $BK\BN$K$OJ#?t$NJ8$,=q$1$k$3$H$,I,MW$H$J$k(B.  $B$3$N$h$&$J>l9g(B,
 @samp{@{} $B$H(B @samp{@}} $B$GJ8$NJB$S$r3g$C$F(B, $B0l$D$NJ8$H$7$F07$&$3$H$,$G(B  @samp{@{} $B$H(B @samp{@}} $B$GJ8$NJB$S$r3g$C$F(B, $B0l$D$NJ8$H$7$F07$&$3$H$,$G(B
Line 988  statement, and the termination condition will be evalu
Line 990  statement, and the termination condition will be evalu
 @code{while} statement.  @code{while} statement.
 \E  \E
 @end itemize  @end itemize
   
   \BJP
   @node $B9=B$BNDj5A(B,,, $B%f!<%6Dj5AH!?t$N=q$-J}(B
   @subsection $B9=B$BNDj5A(B
   \E
   \BEG
   @node structure definition,,, Writing user defined functions
   @subsection structure definition
   \E
   
   \BJP
   $B9=B$BN$H$O(B, $B3F@.J,$NMWAG$,L>A0$G%"%/%;%9$G$-$k8GDjD9G[Ns$H;W$C$F$h$$(B.
   $B3F9=B$BN$OL>A0$G6hJL$5$l$k(B. $B9=B$BN$O(B, @code{struct} $BJ8$K$h$j@k8@$5$l$k(B.
   $B$"$k7?$N9=B$BN$O(B, $BAH$_9~$_4X?t(B @code{newstruct} $B$K$h$j@8@.$5$l$k(B.
   $B9=B$BN$N3F%a%s%P$O(B, $B1i;;;R(B @code{->} $B$K$h$j%"%/%;%9$9$k(B.
   $B%a%s%P$,9=B$BN$N>l9g(B, @code{->} $B$K$h$k;XDj$OF~$l;R$K$G$-$k(B.
   \E
   
   \BEG
   A structure data type is a fixed length array and each component of the array
   is accessed by its name. Each type of structure is distinguished by its name.
   A structure data type is declared by @code{struct} statement.
   A structure object is generated by a builtin function @code{newstruct}.
   Each member of a structure is accessed by an operatator @code{->}.
   If a member of a structure is again a structure, then the specification
   by @code{->} can be nested.
   \E
   
   @example
   [1] struct rat @{num,denom@};
   0
   [2] A = newstruct(rat);
   @{0,0@}
   [3] A->num = 1;
   1
   [4] A->den = 2;
   2
   [5] A;
   @{1,2@}
   @end example
   
 \BJP  \BJP
 @node $B$5$^$6$^$J<0(B,,, $B%f!<%6Dj5AH!?t$N=q$-J}(B  @node $B$5$^$6$^$J<0(B,,, $B%f!<%6Dj5AH!?t$N=q$-J}(B

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>