mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-21 12:23:44 +00:00
Estimated hours taken: 0.1 Branches: main tests/hard_coded/csharp_test.m: Fix a bug in the test case: s/foreign_code/foreign_proc/
30 lines
557 B
Mathematica
30 lines
557 B
Mathematica
% A test of the C# interface.
|
|
|
|
:- module csharp_test.
|
|
:- interface.
|
|
:- import_module io.
|
|
|
|
:- pred main(io__state::di, io__state::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
main -->
|
|
csharp_write_string("Hello, world\n").
|
|
|
|
:- pragma(foreign_decl, "C#", "
|
|
// some C Sharp declarations
|
|
").
|
|
|
|
:- pragma(foreign_code, "C#", "
|
|
// some C Sharp code
|
|
").
|
|
|
|
:- pred csharp_write_string(string::in, io__state::di, io__state::uo) is det.
|
|
|
|
:- pragma(foreign_proc, "C#",
|
|
csharp_write_string(Message::in, _IO0::di, _IO::uo),
|
|
[will_not_call_mercury],
|
|
"
|
|
// a C sharp procedure
|
|
").
|