Bill Allombert on Tue, 19 Sep 2023 16:12:28 +0200


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

Re: PariDroid questions


On Tue, Sep 19, 2023 at 10:52:09AM +0200, hermann@stamm-wilbrandt.de wrote:
> Some questions regarding readvec() and current directory for PariDroid.
> 
> I did store
> https://github.com/Hermann-SW/RSA_numbers_factored/blob/main/pari/RSA_numbers_factored.gp
> in DroidVim home directory.
> 
> Then I am able to use Menu->Read to read that file into PariDroid and then
> run eg. "RSA.validate()".
> 
> One question is, which is the current directory of PariDroid on start?
> Or where I would need to store RSA_numbers_factored.gp on smartphone so that
> I can do readvec("RSA_numbers_factored.gp") in PariDroid?
> 
> On Linux I would store RSA_numbers_factored.gp in the directory I started
> "gp".
> 
> I found "system()" in GP user guide.
> But system("pwd") returns 0, while system("ls") returns 1 in PariDroid.
> No directory listing for "ls".
> 
> I ask because my GP scripts using RSA_numbers_factored.gp just do
> readvec("RSA_numbers_factored.gp") as first command.
> And I would like to work with unchanged scripts in PariDroid and Linux.

If you would like a more Linux-like environment I suggest you try termux, which
has a PARI/GP package. <https://termux.dev/>

Cheers,
Bill