Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!well!jax From: jax@well.UUCP (Jack J. Woehr) Newsgroups: comp.lang.prolog Subject: Re: more on permutations Summary: Forth Programmer remains mystified Keywords: forth, prolog, binary, files, input, avocados Message-ID: <6880@well.UUCP> Date: 22 Aug 88 06:38:53 GMT References: <1161@tuhold> <6850@well.UUCP> <298@quintus.UUCP> Reply-To: jax@well.UUCP (Jack J. Woehr) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 31 In article <298@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >In article <6850@well.UUCP> jax@well.UUCP (Jack J. Woehr) writes: >> May I have an example of a predicate that would accept >>keystroke input and return via the predicate name/2 a list of >>ascii chars, i presume in single-quotes? > >Is this serious? name/2 is used for converting constants to lists >of character codes and vice versa. You wouldn't use it in this >context, but would just read the characters using get0/1. Single >quotes go around atoms; it is double quotes which indicate a list >of codes ("it" = [105,116]). Ok, Richard, maybe we are getting somewhere here. Am I serious? Stupid but serious. It's not like every corner has someone standing on it to answer our Prolog questions! Excuse me for cloggin the Net with my iggerance. What I am trying to do is accept user input, that, unlike ALL the examples in common texts on prolog IS NOT all in lower case, one word, period delimited. I want to get strings, wrap them in whatever they have to be wrapped in, and store them as terms. Then I want to write these predicates to a file, in forms like: customer('Joe Blow',bought('seven bananas and a Tricycle'), owes(13040),rated('a nuisance to Customer Service'). ***************** jax@well " I got a million of 'em!" jax@chariot " Quintus, huh? Any relation to Quintus Fabius Maximus?" JAX on GEnie " I'll teach you Forth if you'll teach me Prolog!"