Home  |   Notes  |   Languages  |   Programs  |   Homework

Re: Prolog compiler

New Message Reply About this list Date view Thread view Subject view Author view

Stephen Edwards (edwards@CS.VT.EDU)
Tue, 30 Oct 2001 09:37:47 -0500


Message-ID:  <3BDEBB3B.599E6BB9@cs.vt.edu>
Date:         Tue, 30 Oct 2001 09:37:47 -0500
From: Stephen Edwards <edwards@CS.VT.EDU>
Subject:      Re: Prolog compiler

Michael Witczak wrote:
>
> I was wondering if there is a way to load a text file as input for the SWI
> prolog compiler (basically the same way we did in MIT scheme)?

Sure. If your source is in a file called code.pl, just do this at
the prompt:

    ?- ['code.pl'].

Remember to use single quotes for literal values like file names, rather
than double quotes. Entering a list of file names (even if there is
just one) as a goal for the interpreter will cause it to load the
corresponding file.

                                -- Steve

--
Stephen Edwards            604 McBryde Hall          Dept. of Computer Science
e-mail      : edwards@cs.vt.edu           U.S. mail: Virginia Tech (VPI&SU)
office phone: (540)-231-5723                         Blacksburg, VA  24061-0106
-------------------------------------------------------------------------------


New Message Reply About this list Date view Thread view Subject view Author view

Home  |   Notes  |   Languages  |   Programs  |   Homework
copyright © 2001 Virginia Tech, ALL RIGHTS RESERVED
Class site maintained by Stephen H. Edwards <edwards@cs.vt.edu>