📄 fileio.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package cmm;import java.io.*;import java.util.*;/** * * @author lx */public class FileIO { public FileIO(){ } public void writeIns(LinkedList instruc) throws IOException{ PrintWriter output = new PrintWriter(new FileWriter("D:\\Instruc.txt")); while(!instruc.isEmpty()){ Instruction temp; temp = (Instruction)instruc.poll(); String ins = temp.getIns().toString(); int lev = temp.getLev(); String a; if(temp.getFlag()){ a = String.valueOf( temp.getA_r()); }else{ a = String.valueOf(temp.getA_i()); } output.println(ins +" "+ lev + " " + a); } output.println("完成目标代码生成!"); output.close(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -