version 1.13, 2003/12/20 13:38:44 |
version 1.15, 2004/07/03 15:50:34 |
|
|
@comment $OpenXM: OpenXM/src/asir-doc/parts/asir.texi,v 1.12 2003/12/18 10:26:20 ohara Exp $ |
@comment $OpenXM: OpenXM/src/asir-doc/parts/asir.texi,v 1.14 2003/12/21 17:36:29 ohara 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 227 Use of lists enables to write programs more easily, sh |
|
Line 227 Use of lists enables to write programs more easily, sh |
|
comprehensible than use of structure like C programs. |
comprehensible than use of structure like C programs. |
\E |
\E |
|
|
|
\BJP |
@item |
@item |
|
$B%f!<%6Dj5AH!?t$K$*$1$k0l9T%X%k%W(B. Emacs-Lisp $B$KN`;w$7$?5!G=$G$"$k(B. |
|
$B>\$7$/$O(B, @xref{$B%f!<%6Dj5AH!?t(B} $B$r8+$h(B. |
|
\E |
|
|
|
@item |
\JP $B%f!<%6Dj5AH!?t$K$*$1$k%*%W%7%g%s;XDj(B. |
\JP $B%f!<%6Dj5AH!?t$K$*$1$k%*%W%7%g%s;XDj(B. |
\EG Options can be specified in calling user defined functions. |
\EG Options can be specified in calling user defined functions. |
|
|
Line 236 comprehensible than use of structure like C programs. |
|
Line 242 comprehensible than use of structure like C programs. |
|
@end itemize |
@end itemize |
|
|
\BJP |
\BJP |
|
@noindent |
|
Asir $B$G$O<!$N8l6g$,%-!<%o!<%I$H$7$FDj$a$i$l$F$$$k(B. |
|
@itemize |
|
@item C $B8@8l$KM3Mh(B: |
|
|
|
@code{break}, @code{continue}, @code{do}, @code{else}, @code{extern}, |
|
@code{for}, @code{if}, @code{return}, @code{static}, @code{struct}, |
|
@code{while} |
|
@item C $B8@8l$+$i$N3HD%(B: |
|
|
|
@code{def}, @code{endmodule}, @code{function}, @code{global}, |
|
@code{local}, @code{localf}, @code{module} |
|
@item $BH!?t(B: |
|
|
|
@code{car}, @code{cdr}, @code{getopt}, @code{newstruct}, @code{map}, |
|
@code{pari}, @code{quote}, @code{recmap}, @code{timer} |
|
@end itemize |
|
\E |
|
|
|
\BJP |
@node $B%f!<%6Dj5AH!?t$N=q$-J}(B,,, $B%f!<%68@8l(B Asir |
@node $B%f!<%6Dj5AH!?t$N=q$-J}(B,,, $B%f!<%68@8l(B Asir |
@section $B%f!<%6Dj5AH!?t$N=q$-J}(B |
@section $B%f!<%6Dj5AH!?t$N=q$-J}(B |
\E |
\E |
Line 461 All the program variables are initialized to the value |
|
Line 487 All the program variables are initialized to the value |
|
\BJP |
\BJP |
@item $BITDj85(B |
@item $BITDj85(B |
$B>.J8;z$G;O$^$j(B, $B%"%k%U%!%Y%C%H(B, $B?t;z(B, @samp{_} $B$+$i$J$kJ8;zNs(B, |
$B>.J8;z$G;O$^$j(B, $B%"%k%U%!%Y%C%H(B, $B?t;z(B, @samp{_} $B$+$i$J$kJ8;zNs(B, |
$B$^$?$O%7%s%0%k%/%*!<%H$G0O$^$l$?J8;zNs(B. |
$B$^$?$O%7%s%0%k%/%*!<%H$G0O$^$l$?J8;zNs(B, $B$b$7$/$OH!?t7A<0(B. |
|
$BITDj85$H$O(B, $BB?9`<04D$r9=@.$9$k:]$KE:2C$5$l$kJQ?t$r$$$&(B. @b{Asir} $B$K(B |
$BITDj85$H$O(B, $BB?9`<04D$r9=@.$9$k:]$KE:2C$5$l$kJQ?t$r$$$&(B. @b{Asir} $B$K(B |
|
$B$*$$$F$O(B, $BITDj85$OCM$r$b$?$J$$D61[E*$J85$G$"$j(B, $BITDj85$X$NCM$NBeF~$O(B |
$B$*$$$F$O(B, $BITDj85$OCM$r$b$?$J$$D61[E*$J85$G$"$j(B, $BITDj85$X$NCM$NBeF~$O(B |
$B5v$5$l$J$$(B. |
$B5v$5$l$J$$(B. |
\E |
\E |
|
|
x^2+x+1 |
x^2+x+1 |
[5] A='Dx'*(x-1)+x*y-y; |
[5] A='Dx'*(x-1)+x*y-y; |
(y+Dx)*x-y-Dx |
(y+Dx)*x-y-Dx |
|
[6] function foo(x,y); |
|
[7] B=foo(x,y)*x^2-1; |
|
foo(x,y)*x^2-1 |
@end example |
@end example |
@end table |
@end table |
|
|
Line 1423 After @samp{|} one can append any number of options se |
|
Line 1451 After @samp{|} one can append any number of options se |
|
[100] xxx(1,2,x^2-1,[1,2,3]|proc=1,index=5); |
[100] xxx(1,2,x^2-1,[1,2,3]|proc=1,index=5); |
@end example |
@end example |
|
|
|
\BJP |
|
$B$5$i$K(B, $B%*%W%7%g%s$r(B @code{key1=value1,key2=value2,...} $B$N$h$&$K(B |
|
@samp{,} $B$G6h@Z$C$FEO$9Be$o$j$K(B, $BFCJL$J%-!<%o!<%I(B @code{option_list} |
|
$B$H%*%W%7%g%s%j%9%H(B @code{[["key1",value1],["key2",value2],...]} |
|
$B$rMQ$$$FEO$9$3$H$b2DG=$G$"$k(B. |
|
|
|
@example |
|
[101] dp_gr_main([x^2+y^2-1,x*y-1]|option_list=[["v",[x,y]],["order",[[x,5,y,1]]]]); |
|
@end example |
|
|
|
$BFC$K(B, $B0z?t$J$7$N(B @code{getopt()} $B$O%*%W%7%g%s%j%9%H$rJV$9$N$G(B, |
|
$B%*%W%7%g%s$r$H$k4X?t$+$i(B, $B%*%W%7%g%s$r$H$k4X?t$r8F$S=P$9$H$-$K$OM-MQ$G$"$k(B. |
|
|
|
@example |
|
% cat foo.rr |
|
def foo(F) |
|
@{ |
|
OPTS=getopt(); |
|
return factor(F|option_list=OPTS); |
|
@} |
|
@end example |
|
|
|
@example |
|
[3] load("foo.rr")$ |
|
[4] foo(x^5-1|mod=11); |
|
[[1,1],[x+6,1],[x+2,1],[x+10,1],[x+7,1],[x+8,1]] |
|
@end example |
|
\E |
|
|
\BJP |
\BJP |
@node $B%b%8%e!<%k(B,,, $B%f!<%6Dj5AH!?t$N=q$-J}(B |
@node $B%b%8%e!<%k(B,,, $B%f!<%6Dj5AH!?t$N=q$-J}(B |