=================================================================== RCS file: /home/cvs/OpenXM/src/asir-doc/parts/builtin/misc.texi,v retrieving revision 1.7 retrieving revision 1.10 diff -u -p -r1.7 -r1.10 --- OpenXM/src/asir-doc/parts/builtin/misc.texi 2001/03/12 05:01:18 1.7 +++ OpenXM/src/asir-doc/parts/builtin/misc.texi 2002/09/03 01:50:59 1.10 @@ -1,4 +1,4 @@ -@comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/misc.texi,v 1.6 2000/02/07 07:11:38 noro Exp $ +@comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/misc.texi,v 1.9 2002/07/15 07:59:27 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 @@ -93,15 +94,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!<%?$rAj(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} @@ -941,7 +1007,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 +1026,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 +1052,11 @@ 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],[key2,value2],...]}. 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,