small files in GProlog

View: New views
2 Messages — Rating Filter:   Alert me  

small files in GProlog

by Robert SETIF :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I am a new user of GProlog and I cannot write a correct file myself in spite of the  Help (accompanying the Software ), Help  that I find very abstract, more convenient for developpers than for beginner users.

That is why I need very small programs which  allow me to experiment them, and so to try modifying them for seing the results.

Where finding such files?

Thank you.


_______________________________________________
Users-prolog mailing list
Users-prolog@...
http://lists.gnu.org/mailman/listinfo/users-prolog

Re: small files in GProlog

by Nicolas Pelletier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

On Mon, May 25, 2009 at 5:07 PM, Robert SETIF <robert.setif@...> wrote:
> I am a new user of GProlog and I cannot write a correct file myself in spite
> of the  Help (accompanying the Software ), Help  that I find very abstract,
> more convenient for developpers than for beginner users.

This is a very general statement that is not going to help improving
what you see as a flaw. Try to point specifically to what needs to be
improved, and say how you would like it improved, for example by
submitting your explanation or a pattern for it. Keep in mind, though,
that the manual documents the GNU Prolog compiler, not the language
Prolog itself.

> That is why I need very small programs which  allow me to experiment them,
> and so to try modifying them for seing the results.
>
> Where finding such files?

Did you google ? Anyway, here is a very simple example to help you get started:

nicolas@tamago:~/dev/prolog$ cat > example.pl <<EOF
> :- initialization( go ).
>
> go :-
>     write( 'Hello, world !' ),
>     nl,
>     halt.
> EOF
nicolas@tamago:~/dev/prolog$ gplc --no-top-level --min-size --output
example example.pl
nicolas@tamago:~/dev/prolog$ ./example
Hello, world !
nicolas@tamago:~/dev/prolog$ ls -l example*
-rwxr-xr-x 1 nicolas nicolas 182576 2009-05-26 14:08 example
-rw-r--r-- 1 nicolas nicolas     81 2009-05-26 14:08 example.pl

Hope this helps,

--
Nicolas


_______________________________________________
Users-prolog mailing list
Users-prolog@...
http://lists.gnu.org/mailman/listinfo/users-prolog