Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!vixen.cso.uiuc.edu!usenet.ucs.indiana.edu!cica.cica.indiana.edu!news.cs.indiana.edu!nstn.ns.ca!cs.dal.ca!ug!cook
From: cook@ug.cs.dal.ca (ADRIAN ROSS COOK)
Subject: "newbie" question
Message-ID: <D0vp4t.398@cs.dal.ca>
Sender: usenet@cs.dal.ca (USENET News)
Nntp-Posting-Host: ug.cs.dal.ca
Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada
X-Newsreader: TIN [version 1.2 PL2]
Date: Fri, 16 Dec 1994 00:53:15 GMT
Lines: 17

Hello. I have a question. I have to be able to turn a token (i.e. word)
from a character string into a functor. The reason I want to do this is
so that I can turn a string input like:

"If someone is a student, they are poor"

into:

poor(X) :- student(X).

I'm using C-Prolog and it doesn't seem to have any built-in functions to
allow me to turn a string token like "student" into student(X) that can be
used later in the same program. This may be a trivial question, I don't
know. Can it be done? How? Any help would be appreciated.
Thanks,
Adrian Cook

