mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-14 05:12:33 +00:00
Estimated hours taken: 4 Branches: main Add some more code to the temporary, partial Java versions of the Mercury library modules. This allows us to test the Java back-end on a few extra test cases and could help prevent regression errors. mercury/java/library/array.java: mercury/java/library/benchmarking.java: mercury/java/library/bintree.java: mercury/java/library/bintree_set.java: mercury/java/library/construct.java: mercury/java/library/dir.java: mercury/java/library/exception.java: mercury/java/library/lexer.java: mercury/java/library/math.java: mercury/java/library/parser.java: mercury/java/library/random.java: mercury/java/library/rtti_implementation.java: mercury/java/library/set_ordlist.java: mercury/java/library/set_unordlist.java: mercury/java/library/store.java: mercury/java/library/table_builtin.java: mercury/java/library/term_io.java: mercury/java/library/varset.java: Added these files. They are partial (or empty) versions of the Mercury library modules written in Java. mercury/java/library/bool.java: mercury/java/library/builtin.java: mercury/java/library/io.java: mercury/java/library/mr_int.java: mercury/java/library/private_builtin.java: mercury/java/library/std_util.java: mercury/java/library/string.java: Add additional code to these files.
42 lines
797 B
Java
42 lines
797 B
Java
//
|
|
// Copyright (C) 2002-2003 The University of Melbourne.
|
|
// This file may only be copied under the terms of the GNU Library General
|
|
// Public License - see the file COPYING.LIB in the Mercury distribution.
|
|
//
|
|
//
|
|
|
|
package mercury;
|
|
|
|
public class mr_int
|
|
{
|
|
public static int mod_2_f_0(int val1, int val2)
|
|
{
|
|
return val1 - (val1 / val2) * val2;
|
|
}
|
|
|
|
public static int div_2_f_0(int val1, int val2)
|
|
{
|
|
return val1 / val2;
|
|
}
|
|
|
|
public static int f_47_47_2_f_0(int val1, int val2)
|
|
{
|
|
int div_res = val1 / val2;
|
|
int rem_res = val1 % val2;
|
|
|
|
return div_res;
|
|
}
|
|
|
|
public static int f_plus_2_f_0(int val1, int val2)
|
|
{
|
|
return val1 + val2;
|
|
}
|
|
|
|
public static boolean domain_checks_0_p_0()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|