=================================================================== RCS file: /home/cvs/OpenXM/src/asir-doc/parts/builtin/misc.texi,v retrieving revision 1.6 retrieving revision 1.13 diff -u -p -r1.6 -r1.13 --- OpenXM/src/asir-doc/parts/builtin/misc.texi 2000/02/07 07:11:38 1.6 +++ OpenXM/src/asir-doc/parts/builtin/misc.texi 2003/08/22 00:44:57 1.13 @@ -1,4 +1,4 @@ -@comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/misc.texi,v 1.5 2000/01/31 05:52:05 noro Exp $ +@comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/misc.texi,v 1.12 2003/04/20 08:01:29 noro Exp $ \BJP @node $B$=$NB>(B,,, $BAH$_9~$_H!?t(B @section $B$=$NB>(B @@ -15,6 +15,7 @@ * help:: * time:: * cputime tstart tstop:: +* timer:: * heap:: * version:: * shell:: @@ -72,7 +73,7 @@ on $B$N;~$OI8=`F~NO$r7+$jJV$7$F=PNO$7(B, off $B$N;~ @code{output} $B%3%^%s%I$rMQ$$$k:]$KM-8z$G$"$k(B. @item bigfloat on $B$N;~(B, $BF~NO$5$l$?IbF0>.?t$O(B @b{bigfloat} $B$KJQ49$5$l(B, $BIbF0>.?t1i;;$O(B -@b{PARI} (@xref{pari}) $B$K$h$j9T$o$l$k(B. $B%G%U%)%k%H$NM-8z7e?t$O(B 9 $B7e$G$"$k(B. +@b{PARI} (@ref{pari}) $B$K$h$j9T$o$l$k(B. $B%G%U%)%k%H$NM-8z7e?t$O(B 9 $B7e$G$"$k(B. $BM-8z7e?t$rA}$d$7$?$$;~$K$O(B @code{setprec()} $B$rMQ$$$k(B. off $B$N;~(B, $BF~NO$5$l$?IbF0>.?t$O(B, $BG\@:EYIbF0>.?t$KJQ49$5$l$k(B. @cindex PARI @@ -86,6 +87,10 @@ on $B$N;~(B, $BH!?t$N:FDj5A;~$K%a%C%;!<%8$rI=<($9$k @item hex 1 $B$N$H$-(B, $B@0?t$O(B 0x $B$G;O$^$k(B 16 $B?J?t$H$7$FI=<($5$l$k(B. -1 $B$N$H$-(B, 16 $B?J?t$O(B, $B4V$K(B @samp{|} $B$r$O$5$s$G(B 8 $B7e$4$H$K6h@Z$C$FI=<($5$l$k(B. +@item real_digit +$BG\@:EYIbF0>.?t$NI=<($N7e?t$r;XDj$9$k(B. +@item double_output +1 $B$N$H$-(B, $BG\@:EYIbF0>.?t$O$D$M$K(B ddd.ddd $B$N7A$GI=<($5$l$k(B. @item fortran_output 1 $B$N$H$-(B, $BB?9`<0$NI=<($,(B FORTRAN $B%9%?%$%k$K$J$k(B. $B$9$J$o$AQQ$,(B @samp{^} $B$NBe$o$j$K(B @samp{**} $B$GI=$5$l$k(B. @@ -93,15 +98,15 @@ on $B$N;~(B, $BH!?t$N:FDj5A;~$K%a%C%;!<%8$rI=<($9$k @item ox_batch 1 $B$N$H$-(B, $BAw?.%P%C%U%!$,$$$C$Q$$$K$J$C$?;~$N$_<+F0E*$K(B flush. 0 $B$N$H$-(B, $B%G!<%?(B, $B%3%^%s%IAw?.Kh$K(B flush. ($B%G%U%)%k%HCM$O(B 0.) -@xref{$BJ,;67W;;(B} +@xref{$BJ,;67W;;(B}. @item ox_check 1 $B$N$H$-(B, $BAw?.%G!<%?$rAjH(B \EG @item References @fref{cputime tstart tstop}, @fref{output}, -@fref{pari}, @fref{setprec}, @fref{eval}. +@fref{pari}, @fref{setprec}, @fref{eval deval}. @end table \JP @node debug,,, $B$=$NB>(B @@ -211,7 +220,7 @@ the debugger is ready for commands. Typing in @code{quit} (Note! without a semicolon.) brings you to exit the debug-mode. @item -@xref{Debugger} for details. +See @ref{Debugger} for details. \E @end itemize @@ -562,6 +571,71 @@ the debug-mode and execute @code{cputime(1)}. @fref{time}, @fref{ctrl}. @end table +\JP @node timer,,, $B$=$NB>(B +\EG @node timer,,, Miscellaneouses +@subsection @code{timer} +@findex timer + +@table @t +@item timer(@var{interval},@var{expr},@var{val}) +\JP :: $B@)8B;~4V$D$-$G7W;;$rl9g$=$NCM$rJV$9(B. $B;XDj;~4VFb$K7W;;$,40N;$7$J$+$C$?>l9g(B, $BBh(B 3 $B0z?t(B +$B$rJV$9(B. + +@item +$BBh(B 3 $B0z?t$NCM$O(B, $B7W;;$,40N;$7$?>l9g$NCM$H6hJL$G$-$kI,MW$,$"$k(B. +\E + +\BEG +@item +@code{timer()} computes an expression under the interval timer. +If the computation finishes within the specified interval, it +returns the result of the computation. Otherwise it returns the third +argument. + +@item +The third argument should be distinguishable from the result on success. +\E + +@end itemize + +@example +[0] load("cyclic"); +1 +[10] timer(10,dp_gr_main(cyclic(7),[c0,c1,c2,c3,c4,c5,c6],1,1,0),0); +interval timer expired (VTALRM) +0 +[11] +@end example + \JP @node heap,,, $B$=$NB>(B \EG @node heap,,, Miscellaneouses @subsection @code{heap} @@ -715,16 +789,16 @@ as its return value. @example [0] shell("ls"); -alg da katsura ralg suit -algt defs.h kimura ratint test -alpi edet kimura3 robot texput.log -asir.o fee mfee sasa wang -asir_symtab gr mksym shira wang_data -base gr.h mp snf1 wt -bgk help msubst solve -chou hom p sp -const ifplot proot strum -cyclic is r sugar +alg da katsura ralg suit +algt defs.h kimura ratint test +alpi edet kimura3 robot texput.log +asir.o fee mfee sasa wang +asir_symtab gr mksym shira wang_data +base gr.h mp snf1 wt +bgk help msubst solve +chou hom p sp +const ifplot proot strum +cyclic is r sugar 0 [1] @end example @@ -750,7 +824,7 @@ cyclic is r sugar @item arg0 \JP $B%j%9%H(B, $B%Y%/%H%k(B, $B9TNs(B \EG list, vector or matrix -@item arg1, ... +@item arg1 ... \JP $BG$0U(B ($B;D$j$N0z?t(B) \EG arbitrary (the rest of arguments) @end table @@ -941,7 +1015,7 @@ of the install directory. @findex getopt @table @t -@item getopt(@var{key}) +@item getopt([@var{key}]) \JP :: $B%*%W%7%g%s$NCM$rJV$9(B. \EG :: Returns the value of an option. @end table @@ -960,6 +1034,11 @@ of the install directory. $B$,$"$k(B (@pxref{$B%*%W%7%g%s;XDj(B}). $B;XDj$5$l$?%*%W%7%g%s$r4X?tFb$G(B $Bl9g(B, @code{getopt()} $B$O(B +@code{[[key1,value1],[key2,value2],...]} $B$J$k%j%9%H$rJV$9(B. +$B$3$3$G(B, @code{key} $B$O4X?t8F$S=P$7;~$K;XDj$5$l$?%*%W%7%g%s(B, @code{value} +$B$O$=$NCM$G$"$k(B. +@item $B4X?t8F$S=P$7$N:]$K(B @var{key} $B$,%*%W%7%g%s$H$7$F;XDj$5$l$F$$$k(B $B>l9g$K$O(B, $B$=$NCM$rJV$9(B. $B$b$7;XDj$,$J$$>l9g$K$O(B, VOID $B7?%*%V%8%'%/%H(B ($B7?<1JL;R(B -1) $B$rJV$9(B. @code{getopt()} $B$,JV$7$?CM$N7?$r(B @code{type()} @@ -981,6 +1060,12 @@ must be equal to that in the declaration of the functi A function with indefinite number of arguments can be realized by using @var{options} (@pxref{option}). The value of a specified option is retrieved by @code{getopt}. +@item +If @code{getopt()} is called with no argument, then it returns a list +@code{[[key1,value1],} @code{[key2,value2],@dots{}]}. +In the list, each @code{key} +is an option which was specified when the function executing @code{getopt} +was invoked, and @code{value} is the value of the option. @item If an option @var{key} is specified upon a function call, @code{getopt} return the value of the option. If such an option is not specified,