From a-doug@microsoft.com  Fri Oct  6 21:22:31 2000
Received: from mail5.microsoft.com (mail5.microsoft.com [131.107.3.121])
	by swi.psy.uva.nl (8.9.3/8.9.3) with SMTP id VAA17398
	for <prolog@swi.psy.uva.nl>; Fri, 6 Oct 2000 21:22:29 +0200 (MET DST)
Received: from 157.54.9.108 by mail5.microsoft.com (InterScan E-Mail VirusWall NT); Fri, 06 Oct 2000 12:22:44 -0700 (Pacific Daylight Time)
Received: by INET-IMC-05 with Internet Mail Service (5.5.2651.58)
	id <4L19X4M6>; Fri, 6 Oct 2000 12:22:43 -0700
Message-ID: <56791EC22E349D428D0C05C89EAB8A2421A27C@red-msg-05.redmond.corp.microsoft.com>
From: "Douglas Miles (Volt Computer)" <a-doug@microsoft.com>
To: "'Oliver'" <a9503280@unet.univie.ac.at>, prolog@swi.psy.uva.nl
Subject: RE: Help
Date: Fri, 6 Oct 2000 12:22:31 -0700 
X-Mailer: Internet Mail Service (5.5.2651.58)


file_bytes(Src,ByteList):-!,
	open(Src, read, Stream),
	file_bytes1(Stream,ByteList),
	close(Stream).

file_bytes1(Stream,[]):- at_end_of_stream(Stream),!.

file_bytes1(Stream,[Byte|ByteList]):-
	get_byte(Stream,Char),
	file_bytes1(Stream,ByteList).

?-file_bytes('myhtml.html',Bytes).


Then from there you should be able to parse the bytes.

-Douglas

> -----Original Message-----
> From: Oliver [mailto:a9503280@unet.univie.ac.at]
> Sent: Tuesday, October 03, 2000 12:30 AM
> To: Douglas Miles (Volt Computer)
> Subject: RE: Help
> 
> 
> Hi Douglas,
> thanks for your e-mail. First I wanted to read from a text file just
> characters and show them on screen. But it doesn't work 
> because I got the
> error message "unexpected end of file" or something like that. But the
> main task is that I should have a HTML formular where I can check some
> checkboxes so that the Prolog program can use this values. So 
> I thought
> that it would be the easiest to write with html in a file and then to
> read the file with prolog. I don't know if it is the best (or 
> easiest) way
> to do so. I also found the pillow package from CIAO which use html and
> prolog over a CGI. But the problem is that it doesn't work on 
> SWI Prolog
> and I have to use SWI Prolog. Maybe you can give me a tip how 
> I can solve
> my problem best.
> Thank you very much.
> Oliver
> 
> On Mon, 2 Oct 2000, Douglas Miles (Volt Computer) wrote:
> 
> > 
> > 
> > > -----Original Message-----
> > > From: Douglas Miles (Volt Computer) 
> > > Sent: Monday, October 02, 2000 3:07 PM
> > > To: 'Oliver'; Prolog
> > > Subject: RE: Help
> > > 
> > > 
> > > Oliver,
> > > 
> > > This text file,
> > > 
> > > Does each prolog clause end with a period?
> > > 
> > > Or is it just alphanumeric text in non-prolog clause form? .. 
> > > if so.. Are you trying to read it in as prolog terms or are 
> > > you trying charicter by charicter?
> > > 
> > > -Douglas
> > > 
> > > > -----Original Message-----
> > > > From: Oliver [mailto:a9503280@unet.univie.ac.at]
> > > > Sent: Monday, October 02, 2000 11:22 AM
> > > > To: Prolog
> > > > Subject: Help
> > > > 
> > > > 
> > > > hi,
> > > > we have to read from a text file...
> > > > but we always get the following error message:
> > > >      Syntax error: Unexpected end of file
> > > > Do we have to put a special Character in the file?
> > > > Hope somebody can help us...
> > > > thanks a lot
> > > > oliver
> > > > 
> > > > 
> > > > ----------------
> > > > * To UNSUBSCRIBE, please use the HTML form at
> > > > 
> > > >     
> > > > 
http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
> > > 
> > > or send mail to prolog-request@swi.psy.uva.nl using the 
> > > Subject: "unsubscribe"
> > > (without the quotes) and *no* message body.
> > > 
> > > ** An ARCHIVE of this list is maintained at
> > > 
> > >     
> > http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/
> > > 
> > 
> 

