Files
mercury/tests/valid/foreign_underscore_var.m
Zoltan Somogyi c03b11ca48 Update the style of more test cases.
And updated expected outputs for changed line numbers.
2021-07-27 19:29:21 +10:00

30 lines
565 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module foreign_underscore_var.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
main(!IO) :-
f(X, !IO),
io.write_int(X, !IO),
io.nl(!IO).
:- pred f(int::out, io::di, io::uo) is det.
:- pragma foreign_proc("C",
f(X::out, _IO0::di, _IO::uo),
[will_not_call_mercury, promise_pure],
"
X = 5;
").
f(5, !IO).