Sung Hyun Lim on Sun, 17 Jul 2016 09:27:01 +0200


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

Reading and Compiling a File


Hi,

I'm completely new to PARI/GP, so please bear with me for this possibly stupid question:

I'd like to have gp execute a .gp file on my computer and I don't know how to do this.

(There are such files like bench.gp in the "examples" folder that comes along with PARI/GP installation)

It seems like the commands "\r" or "read" both are meant to do this, but if i type 

read bench.gp

or

read examples\bench.gp

the results are as follows:

===================================

? read bench.gp

  ***   at top-level: readbench.gp

  ***                           ^--

  ***   not a function in function call

  ***   Break loop: type 'break' to go back to GP prompt

break> break


? read examples\bench.gp

  ***   at top-level: readexamples\bench.gp

  ***                                    ^--

  ***   not a function in function call

  ***   Break loop: type 'break' to go back to GP prompt

break> break


? \r bench.gp


  ***   error opening input file: `bench.gp'.

  ***   Break loop: type 'break' to go back to GP prompt

break> break


? \r examples\bench.gp


  ***   error opening input file: `examples\bench.gp'.

  ***   Break loop: type 'break' to go back to GP prompt

break> break

===================================


so I really don't know what to do with all this.


I desperately need help on this matter, so if anyone knows how to read and write a file please tell me!


Thank you very much in advance!!!


Regards,

Sung Hyun Lim