Re: [eclipse-clp-users] Command line interpreter

From: Kish Shen <kisshen_at_...5...>
Date: Fri, 22 Jan 2010 02:07:34 +0000
Alex Rozenshteyn wrote:
> Forgive the horribly newbie question, but I haven't been able to figure it
> out.
> When I try to write anything that isn't a predefined predicate in the
> command line interpreter, I get "calling an undefined procedure".  I'm
> wondering if there's a way to do something equivalent to the tk
> interpreter's compile scratch-pad.
> Also, forgive me if this has been already answered; I couldn't figure out
> how to search the sourceforge archives.
Hi Alex,

The top-level is for issuing queries. If you want to write code, you 
need to compile it. To compile code while you are in the tty (compile 
line) top-level, you can use the query [user], which means to compile 
the user stream (i.e. the input for the tty top-level), and not a file 
with the name user.

You can then type in the code you want, and end this with a ^D 
(control-D) to return to the top-level.

You should only do this for very simple code that you just want to test 
things out. For anything else, you should write the code in a file and 
compile that.

Note that ECLiPSe inherited this use of [user] from Prolog -- it was 
developed in the days when people have only a single text terminal, so 
it is not convenient to write code when you are inside the top-level. 
However, with the graphical windowing systems these days, it is very 
easy to have a different window with an editor to write code you want to 
test, so [user] is really much less needed now (and this is why it is 
not supported in the TkECLiPSe top-level).



This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Fri Jan 22 2010 - 02:07:49 CET

This archive was generated by hypermail 2.3.0 : Wed Aug 21 2019 - 09:13:32 CEST