Logtalk 2.24.0 files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1282 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura
2005-04-22 23:57:45 +00:00
parent 08efcbeb64
commit c2e03a81b9
195 changed files with 4005 additions and 1219 deletions

View File

@@ -0,0 +1,20 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.24.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
=================================================================
To load this example and for sample queries, please see the SCRIPT file.
This is a very simple example of using the new, experimental encoding/1
directive, which is fully based on the directive with the same name found
on recent development releases of SWI-Prolog. Currently, this example
requires Logtalk to be run with the SWI-Prolog compiler.
The "babel.lgt" source file uses UTF-8 encoding. When browsing its code,
be sure to use a text editor that supports this encoding. In addition,
you may need to configure your text editor to open the source file using
this encoding. If you are using the SWI-Prolog GUI application on Windows,
be sure to select a font which supports Unicode characters.

View File

@@ -0,0 +1,46 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.24.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
=================================================================
% start by loading the example:
| ?- logtalk_load(encodings(loader)).
...
% query the table of "Hello world!" messages:
| ?- babel::hello_world(Code, Text).
Code = el
Text = 'Γειάσου κόσμος!' ;
Code = en
Text = 'Hello world!' ;
Code = es
Text = '¡Hola mundo!' ;
Code = ja
Text = 'こんにちは世界!' ;
Code = ko
Text = '여보세요 세계!' ;
Code = nl
Text = 'Hello wereld!' ;
Code = pt
Text = 'Olá mundo!' ;
Code = ru
Text = 'Здравствулте! мир!' ;
Code = zh
Text = '你好世界!'
Yes

View File

@@ -0,0 +1,29 @@
:- encoding(utf8).
:- object(babel).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2005/04/06,
comment is 'Simple test of the encoding/1 directive.']).
:- public(hello_world/2).
:- mode(hello_world(?atom, ?atom), zero_or_more).
:- info(hello_world/2, [
comment is 'Table of "hello world" messages in several languages (using ISO 639-2 two letter language codes for indexing).',
argnames is ['Language', 'Text']]).
hello_world(el, 'Γειάσου κόσμος!').
hello_world(en, 'Hello world!').
hello_world(es, '¡Hola mundo!').
hello_world(ja, 'こんにちは世界!').
hello_world(ko, '여보세요 세계!').
hello_world(nl, 'Hello wereld!').
hello_world(pt, 'Olá mundo!').
hello_world(ru, 'Здравствулте! мир!').
hello_world(zh, '你好世界!').
:- end_object.

View File

@@ -0,0 +1,4 @@
:- initialization(
logtalk_load([
babel])).