From: Ken A. <kan...@bb...> - 2004-06-01 15:46:03
|
What you say about string->number is the way i expected it to be have too. parse-java-literal would be a good extension. I think the code is now built in to InputPort. This might be a good place to put it all together and fix other problems. k At 10:27 AM 5/30/2004 -0400, Jonathan A Rees wrote: >This discussion wasn't clear to me but I assume you're going to have > (string->number "011" 8) => 9 > (string->number "011" 10) => 11 >So the question is what to do about > (string->number "011") >My vote as usual is when in doubt follow a Scheme report, because >someone might consult a report when using jscheme. If you want to >have something to parse Java literal syntax, give it a different name; >then you could sensibly extend it to other kinds of literals, e.g. > (parse-java-literal "true") => #t > (parse-java-literal "'t'") => #\t > (parse-java-literal "\"true\"") => "true" >But if the Java literal parser has to have the name string->number >either for backward compatibility or to suit your taste, that's not >terrible; I always give it an explicit radix anyhow. > >Jonathan > > >------------------------------------------------------- >This SF.Net email is sponsored by: Oracle 10g >Get certified on the hottest thing ever to hit the market... Oracle 10g. >Take an Oracle 10g class now, and we'll give you the exam FREE. >http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |