Question: How do I write a list containing two prime numbers (100 digits each) to a text file in a specific directory?

July 01 2014 schloemilch 20


Hi :)

I have a Macbook Air running on OS X Mavericks. I am using Maple16.

I created a procedure, which construct two keys. Each of those keys consists of a list containing two elements. That is two primes. So at the end of my procedure I included the following code in order to write my data to a file:

> pkey := fopen(keyFile, WRITE, TEXT);
> writedata(pkey, publicKey);
> fclose(pkey);

The problem is that I can't find the created file "keyFile".

So I tried breaking the problem down. I created a List and wanted to write that list in a textfile in a specific folder:

> L := [1, 2, 3];
> fd := fopen("Users\\****\\Desktop\\fdtest.txt", WRITE, TEXT);
> fprintf(fd, "This is a test");
> fclose(fd);

But this did not work either. It seems like the file fdtest.txt never gets created. This happens in general when I use fopen().

Thank you in advance for your help




Please Wait...