Iwao KIMURA on Tue, 15 Jan 2002 11:53:48 +0900 (JST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: flisseq() and filtre() |
Hi, Here I give an example which may illustrates my previous post. -------------------- iwao@kagemaru:/usr/home/iwao/Lang/C/Pari {504}$ cat ./study_flisseq.c #include <stdio.h> #include <stdlib.h> #include <pari.h> /* * flisseq seems not to handle `\' properly. */ int main (void) { char inputs[] = "v=[[1,1;0,1],\\\n[0,1;-1,0]]\n"; GEN v; pari_init (2000000, 2); printf ("inputs = %s\n", inputs); printf ("filtre(inputs) = %s\n", filtre ((char *) inputs, NULL, 2)); v = flisseq ((char *)inputs); printf ("evaluated = %s\n", GENtostr (v)); return EXIT_SUCCESS; } iwao@kagemaru:/usr/home/iwao/Lang/C/Pari {505}$ gcc -o study_flisseq study_flisseq.c -I/usr/local/include/pari -L/usr/local/lib -lpari-2.2 -lm iwao@kagemaru:/usr/home/iwao/Lang/C/Pari {506}$ ./study_flisseq inputs = v=[[1,1;0,1],\ [0,1;-1,0]] filtre(inputs) = v=[[1,1;0,1],\[0,1;-1,0]] *** unexpected character: v=[[1,1;0,1],\[0,1;-1,0]] ^------------ *** Error in the PARI system. End of program. -------------------- I expected inputs strings filtered and evaluated as `v=[[1,1;0,1],[0,1;-1,0]]'. Thanks. ;# Iwao KIMURA ;# ;# Faculty. Math, Dept. of Sciece ;# ;# Toyama University ;#