mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
samples/java_interface/java_calls_mercury/*.m:
Use spaces instead of tabs.
Delete trailing whitespace.
Fix a cut-and-paste error where exports to C instead of
Java are referred to.
samples/java_interface/mercury_calls_java/Makefile:
Fix the compilation options for this example.
samples/java_interface/mercury_calls_java/mercury_main.m:
Fix formatting.
20 lines
500 B
Mathematica
20 lines
500 B
Mathematica
% This source file is hereby placed in the public domain.
|
|
|
|
:- module mercury_main.
|
|
:- interface.
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
% import the module which defines the Mercury interface to the
|
|
% Java method JavaMain.java_main().
|
|
:- import_module java_main_int.
|
|
|
|
% main just invokes java_main
|
|
main(!IO) :-
|
|
io.write_string("In Mercury main, about to call java_main...\n", !IO),
|
|
java_main(!IO),
|
|
io.write_string("Back in Mercury main.\n", !IO).
|