Tom Gettys on Mon, 27 Nov 2006 06:19:27 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
RE: PARI |
Thanks for your considered and complete reply Justin; much appreciated! Tom Gettys 2929 Warren Street Eugene, Oregon 97405 (541) 683-1940 http://home.comcast.net/~tpgettys/ To dream of the person you would like to be is to waste the person you are. -----Original Message----- From: Justin C. Walker [mailto:justin@mac.com] Sent: Sunday, November 26, 2006 2:20 PM To: Pari Developers Pari Subject: Re: PARI On Nov 26, 2006, at 13:37 , Tom Gettys wrote: > Thank you very much for your response Bill. So, just to be clear, > there is > no way to compose a multiline script within PARI, and no way to > modify one > that I read in from a file, correct? Also, I presume that after > file is > read using the \r command PARI starts to execute the script > immediately > (that is, there is no GO or RUN command). A) Multiline scripts can be constructed within a gp session: SillyFunc(n)={ print(n); return(5*n); } defines a function that you can use later in your session. B) if you have built with GNU readline support, then you can modify the script within the gp session: just "^P" to get back to the function definition (which may appear on one extended line). Your best bet in all cases, though, is as Bill suggests: use an external editor and "\r". C) If your script is a sequence of executable statements, yes, they will all be executed when read. I think in general, they way most of us work, for even the simplest scripts, is to use functions, so they just become defined, without themselves being executed. Justin -- Justin C. Walker, Curmudgeon-At-Large Institute for the Absorption of Federal Funds -------- Some people have a mental horizon of radius zero, and call it their point of view. -- David Hilbert --------