Justin C. Walker on Sun, 26 Nov 2006 23:16:37 +0100

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]


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:

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 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