[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-mail] Help with AXIOM
From: |
David MENTRE |
Subject: |
Re: [Axiom-mail] Help with AXIOM |
Date: |
Thu, 08 Jan 2004 19:28:11 +0100 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) |
Hello Elias,
"Elias P. TSIGARIDAS" <address@hidden> writes:
> Can anyone tell me how to open a file and read some values from it?
Yes, use the File package:
(2) -> )show File
File S: SetCategory is a domain constructor
Abbreviation for File is FILE
This constructor is exposed in this frame.
Issue )edit
/home/david/pub/axiom-libre/axiom-i386/axiom/mnt/linux/../../src/algebra/FILE.spad
to see algebra source code for FILE
------------------------------- Operations --------------------------------
?=? : (%,%) -> Boolean close! : % -> %
coerce : % -> OutputForm hash : % -> SingleInteger
iomode : % -> String latex : % -> String
name : % -> FileName open : (FileName,String) -> %
open : FileName -> % read! : % -> S
reopen! : (%,String) -> % write! : (%,S) -> S
?~=? : (%,%) -> Boolean
readIfCan! : % -> Union(S,"failed")
File works over typed values:
(2) -> afile : File List Integer := open ("/tmp/jazz1", "output")
(2) "/tmp/jazz1"
Type: File List Integer
Time: 0.01 (EV) + 0.01 (OT) = 0.02 sec
(3) -> write!(afile, [-1, 2, 3])
(3) [- 1,2,3]
Type: List Integer
Time: 0 sec
(4) -> reopen!(afile, "input")
(4) "/tmp/jazz1"
Type: File List Integer
Time: 0.01 (EV) = 0.01 sec
(5) -> read! afile
(5) [- 1,2,3]
Type: List Integer
Time: 0 sec
The content of the file seems to be written as Lisp values:
(6) -> )system cat /tmp/jazz1
(-1 2 3)
See also TextFile KeyedAccessFile, Library and Filename packages.
> Is there a time function in axiom?
If you want to time computations in axiom, you can use following
command:
(1) -> )set message time on
(1) -> 1+1
(1) 2
Type: PositiveInteger
Time: 0.01 (IN) + 0.01 (OT) = 0.02 sec
> Any good online tutorial except
> http://www.dcs.st-and.ac.uk/~mnd/documentation/axiom_tutorial/
Yep. Bill Page has retranscripted a tutorial that is available in both
TeXmacs and PDF formats.
Due to savannah download area currently down, I have put them at:
http://www.linux-france.org/~dmentre/axiom/doc/axiom_texmacs.pkg/
Look at latest version of it.
You can also find the introduction of Axiom Book at:
http://www.linux-france.org/~dmentre/axiom/doc/axiom_book.pkg/Introduction%20v1.0.0/
I hope it helps,
Yours,
d.
--
David MENTRE <address@hidden> -- http://www.nongnu.org/axiom/
- [Axiom-mail] Help with AXIOM, Elias P. TSIGARIDAS, 2004/01/08
- Re: [Axiom-mail] Help with AXIOM,
David MENTRE <=
- Re: [Axiom-mail] Help with AXIOM, David MENTRE, 2004/01/09
- Re: [Axiom-mail] Help with AXIOM, David MENTRE, 2004/01/10
- Re: [Axiom-mail] Help with AXIOM, Elias P. TSIGARIDAS, 2004/01/09
- Message not available
- Re: [Axiom-mail] Help with AXIOM, David MENTRE, 2004/01/09
- Re: [Axiom-mail] Help with AXIOM, root, 2004/01/10
- Re: [Gcl-devel] Re: [Axiom-mail] Help with AXIOM, Camm Maguire, 2004/01/10
- Re: [Axiom-mail] Help with AXIOM, Elias P. TSIGARIDAS, 2004/01/10
- Re: [Axiom-mail] Help with AXIOM, David MENTRE, 2004/01/10
- Re: [Axiom-mail] Help with AXIOM, Elias P. TSIGARIDAS, 2004/01/12
Re: [Axiom-mail] Help with AXIOM, Renaud . Rioboo, 2004/01/10