%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% readAtom.pl
%
% Stephan Walter, 2003
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



/*******************************************************************

readAtom/1

Reads one line of input into an atom.

Example of use:

2 ?- readAtom(A).
|: hallo spencer.

A = 'hallo spencer.' 

Yes
3 ?- 

********************************************************************/
:- module(readAtom,[readAtom/1]).

readAtom(A) :-
	readChars(S),
	name(A,S).

readChars([Char|Rest]):-
   get0(Char),
   Char\=10,!,
   readChars(Rest).

readChars([]).