Write a java program that reads a file containing instruction written in TPL, and executes those instructions. This program should be take the name of the TPL file as a command line parameter, and write its output to the console. For Example
java test power.tpl <== input (data in factor file show below)
and output is something like below
================== Tpl create by Hunt
25
[10 line processed] ==================
My problem is I donot know how to start this example? Can someone give me a little start program or concept or something... Many thk for everyone who read
*factor.tpl* ********************* INTERGER myint INTERGER ans LET myint = 5 CALCULATE ans=ans*ans PRINT ans
Dont know what u want actually, if u just want to read a tpl file or any file for that matter the code shud loook like///
FileReader _artima_help = new FileReader("power.tpl");//or the argument
BufferedReader _f = new BufferedReader(_artima_help );
String _s = null;
while ((_s = _f.readLine()) !=null)
{
System.out.println(_s);
//Also u can process here as line number blah blah
}