mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   PARI/GP (https://www.mersenneforum.org/forumdisplay.php?f=155)
-   -   PARI's commands (https://www.mersenneforum.org/showthread.php?t=13636)

science_man_88 2010-12-02 21:22

control characters
 
[U]what I've found to work for me:
[/U]

print("\t") -> tab
print("\n") -> newline

looking up things about javascript control characters gave me these.

never mind only; [url]http://rosettacode.org/wiki/Special_characters#PARI.2FGP[/url] which list 4 lol

CRGreathouse 2010-12-02 22:15

[QUOTE=science_man_88;239738]the enters are easy the 0's are the hard part.

[CODE](16:28) gp > read_file_completely(file)= b=[];a=eval(Vec(Str(read(file))));b=concat(a,b);
(16:28) gp > read_file_completely("e:\\modulo.txt")
%279 = [3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9][/CODE]

also I can get the file up back in full i believe. I'd do it in the script lol.[/QUOTE]

Try this in a file:[INDENT]1+1;v=n->n^2;[/INDENT]

3.14159 2010-12-02 22:17

Charles; Can you make scripts in Sage? I'm too lazy to go through the whole process of trying to install and run it on here.

science_man_88 2010-12-02 22:27

[QUOTE=CRGreathouse;239757]Try this in a file:[INDENT]1+1;v=n->n^2;[/INDENT][/QUOTE]

is there a way to fix pari back to installed defaults ? I played too much with things i hate the view lol.

it acted as code or gave me back an error lol but without it it didn't

CRGreathouse 2010-12-02 22:30

[QUOTE=science_man_88;239747]never mind only; [url]http://rosettacode.org/wiki/Special_characters#PARI.2FGP[/url] which list 4 lol[/QUOTE]

I added those. The manual only has three, but I happen to know that \" also works.

CRGreathouse 2010-12-02 22:32

[QUOTE=science_man_88;239759]is there a way to fix pari back to installed defaults ? I played too much with things i hate the view lol.[/QUOTE]

If you want to change the window, right-click, choose properties, choose the layout tab, and change the window size and/or the screen buffer size.

CRGreathouse 2010-12-02 22:33

[QUOTE=3.14159;239758]Charles; Can you make scripts in Sage? I'm too lazy to go through the whole process of trying to install and run it on here.[/QUOTE]

Sage uses Python for scripting, so that's the language you would use.

science_man_88 2010-12-02 22:33

[QUOTE=CRGreathouse;239761]If you want to change the window, right-click, choose properties, choose the layout tab, and change the window size and/or the screen buffer size.[/QUOTE]

yeah well how come now when I open it it uses ? instead of what was before lol I can't find a setting there to do it lol.

CRGreathouse 2010-12-02 22:34

[QUOTE=science_man_88;239763]yeah well how come now when I open it it uses ? instead of what was before lol I can't find a setting there to do it lol.[/QUOTE]

That's the .gprc file. Go to it (probably under C:\Program Files\PARI\ or C:\Program Files (x86)\PARI\) and change the prompt line.

science_man_88 2010-12-02 22:37

[QUOTE=CRGreathouse;239764]That's the .gprc file. Go to it (probably under C:\Program Files\PARI\ or C:\Program Files (x86)\PARI\) and change the prompt line.[/QUOTE]

I stupidly recycled it lmao.

3.14159 2010-12-02 23:32

A prime number; 397^2 + 448^2, or 358313, is a prime number.

(6888*52)^2 + 1 = 128290046977 is also prime.

Lucky guesses, it seems..


All times are UTC. The time now is 23:08.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.