I give up.
Why do thousands (maybe less?) of programmers use READ in Lisp?
Why did they come up with READ in the first place?
I dunno... I just use it now and then, and it's handy.
Let's close this thread. At least from my side, I don't have that much time to spend on this.
Have fun.
-Leo-
Search found 11 matches
- Mon Jun 27, 2005 12:57 pm
- Forum: Whither newLISP?
- Topic: READ
- Replies: 20
- Views: 24860
- Sun Jun 26, 2005 6:22 pm
- Forum: Whither newLISP?
- Topic: READ
- Replies: 20
- Views: 24860
- Sun Jun 26, 2005 12:19 pm
- Forum: Whither newLISP?
- Topic: READ
- Replies: 20
- Views: 24860
Maybe this makes it more clear. Think of a file that I want to read in with the following: [bof] some-atom (and then a list with information) (and another list (with yet another list running into a newline) and some more) (this maybe formatted in 80-column text) some-other atom (and again a list wit...
- Sat Jun 25, 2005 9:03 pm
- Forum: Whither newLISP?
- Topic: READ
- Replies: 20
- Views: 24860
Isnt 'load doing that? Nope. Quote from the newLisp manual: Loads and translates newLISP from a source file specified in one or more str-file-name and evaluates the expressions contained in the file(s). It should not evaluate and READ doesn't Besides: I want a controlled one by one READ of S-expres...
- Sat Jun 25, 2005 9:01 pm
- Forum: Whither newLISP?
- Topic: READ
- Replies: 20
- Views: 24860
- Sat Jun 25, 2005 8:56 pm
- Forum: Whither newLISP?
- Topic: READ
- Replies: 20
- Views: 24860
Simple: (from xLisp) read an expression (read [<stream> [<eofp> [<eof> [<rflag>]]]]) <stream> the input stream (default, or NIL, is *standard-input*, T is *terminal-io*) <eofp> When T, signal an error on end of file, when NIL return <eof> (default is T) <eof> the value to return on end of file (defa...
- Sat Jun 25, 2005 7:34 pm
- Forum: Whither newLISP?
- Topic: READ
- Replies: 20
- Views: 24860
READ
Hi, here's my version of READ: It is used to read a text file one atom or list at a time. I'm out of practise since I haven't programmed in Lisp since 1993, and I'm new to newLisp If someone likes to make an elegant version, be my guest! (define (read fHandle, i result) (setq result "") (do-while (n...
- Sat Jun 25, 2005 2:50 pm
- Forum: Whither newLISP?
- Topic: READ
- Replies: 20
- Views: 24860
Maybe it is not like muLISP-read, but I use it in code ported from autolisp. So it should be possible to code the wanted behaviour. You can list all test-cases of input and wanted output and then it should be possible. Yes, I could. Thanx for helping. I'm a little suprised that such a basic functio...
- Fri Jun 24, 2005 3:47 pm
- Forum: Whither newLISP?
- Topic: READ
- Replies: 20
- Views: 24860
Thanx, but this is also not what I'm looking for. It should not evaluate and read an atom or a list at the time. I used this read-emulation: (define (read readstr readret) (cond ((float readstr) (if (find "." readstr) (setq readret (float readstr)) (setq readret (integer readstr)) ) ) ((=(slice read...
- Fri Jun 24, 2005 3:43 pm
- Forum: Whither newLISP?
- Topic: READ
- Replies: 20
- Views: 24860
READ
If you are reading from a file: (eval-string (read-file "filename")) If you just want to evaluate something from the console (eval-string (read-line)) Hope this helps. Eddie No, this is not what READ does. READ reads one atom or a list at a time, but does not evaluate. Quoted text is read in as str...
- Thu Jun 23, 2005 7:39 pm
- Forum: Whither newLISP?
- Topic: READ
- Replies: 20
- Views: 24860
READ
Hi, I'm new to newLisp, but not to lisp.
In the lisp I used most often muLISP (a looong time ago) there was a READ function, to read a normal LISP expression.
Why is that not present in newLISP? Does anyone have ready made READ function?
TIA
-Leo-
In the lisp I used most often muLISP (a looong time ago) there was a READ function, to read a normal LISP expression.
Why is that not present in newLISP? Does anyone have ready made READ function?
TIA
-Leo-