This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/jpl/jpl/docs/prolog_api/gotchas.html

41 lines
1.3 KiB
HTML

<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR"
content="Mozilla/4.74 [en] (WinNT; U) [Netscape]">
<title>JPL 3.x Prolog-calls-Java gotchas</title>
</head>
<body>
<h1><span style="font-style: italic;">
JPL 3.x</span> Prolog API gotchas
</h1>
<hr width="100%">
<h2>calling methods with no parameters
</h2>
<blockquote>you must pass an empty parameter list when calling Java
methods which take no parameters, e.g.<br>
<pre style="margin-left: 40px;">jpl_call('java.lang.System', gc, [], _)<br></pre>
</blockquote>
<h2>calling void methods
</h2>
<blockquote>you must accept an @(void) result when calling void Java
methods, e.g. either<br>
<pre style="margin-left: 40px;">jpl_call('java.lang.System', gc, [], @(void))</pre>
which explicitly matches the expected result, or<br>
<pre style="margin-left: 40px;">jpl_call('java.lang.System', gc, [], _)</pre>
which uses an anonymous variable to ignore the result.<br>
</blockquote>
<h2><span style="font-style: italic;">(more to come...)</span><br>
</h2>
<blockquote></blockquote>
<hr style="width: 100%; height: 2px;">
<address><a href="mailto:p.singleton@keele.ac.uk">Paul Singleton</a></address>
<address>
drafted Wednesday 4th February 2004<br>
<br>
</address>
</body>
</html>