newLISP Fan Club

Forum => newLISP newS => Topic started by: Jeff on March 31, 2008, 05:48:47 AM

Title: Feature request: scanf
Post by: Jeff on March 31, 2008, 05:48:47 AM
Lutz,



May we have a fast scanf-style reader to parse input in the next release?  Something the opposite of format, perhaps?
Title: Re: Feature request: scanf
Post by: scottmaccal on April 02, 2008, 06:28:38 PM
Quote from: "Jeff"Lutz,



May we have a fast scanf-style reader to parse input in the next release?  Something the opposite of format, perhaps?


I second that.
Title:
Post by: Lutz on April 02, 2008, 06:43:40 PM
Did you read my other post about using (read-line)  for getting input from user? You can combine that and regular expressions with 'regex' or 'parse' to parse out the components from the input.
Title:
Post by: scottmaccal on April 03, 2008, 06:14:08 PM
Quote from: "Lutz"Did you read my other post about using (read-line)  for getting input from user? You can combine that and regular expressions with 'regex' or 'parse' to parse out the components from the input.


Lutz,



I did. Thank you again. I can't believe I missed that in the manual! :-)



Thank you for creating and sharing newLISP too!



It is what I have been looking for. The first LISP that I began to feel comfortable with (after much pain) was Emacs Lisp. But newLISP is now my favorite.
Title:
Post by: Jeff on April 04, 2008, 04:54:25 AM
I know, but scanf is faster, more exact, defines types, and uses *much* less memory.  Which is why programs still use scanf over regex in many scenarios.  Scanf gives me complete control over user input and guarantees that I get either the correct input and input types or that I get nothing at all.