debug.java

来自「MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程」· Java 代码 · 共 28 行

JAVA
28
字号
import java.io.*;public class debug{    private static boolean msg_on = false;    private static String filename = null;    public static void SetMessageOn() { msg_on = true; }    public static void SetMessageOff() { msg_on = false; }    public static void SetFilename( String in_name )    throws IOException    {        filename = new String( in_name );        System.setOut( new PrintStream( new FileOutputStream(in_name) ) );    }    public static void print( String x )    {        if ( msg_on ) System.out.print( x );    }    public static void println( String x )    {        if ( msg_on ) System.out.println( x );    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?