The Artima Developer Community
Sponsored Link

Java Answers Forum
Plz Plz can someone help me about create tpl file??

1 reply on 1 page. Most recent reply: Jan 12, 2004 8:10 PM by mausam

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
thanawat

Posts: 5
Nickname: follownet
Registered: Nov, 2003

Plz Plz can someone help me about create tpl file?? Posted: Jan 6, 2004 6:35 AM
Reply to this message Reply
Advertisement
Just got coursework about vreate file.tpl by java

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

END
*********************


mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: Plz Plz can someone help me about create tpl file?? Posted: Jan 12, 2004 8:10 PM
Reply to this message Reply
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
}
 
 

Flat View: This topic has 1 reply on 1 page
Topic: Servlet request forwarding Previous Topic   Next Topic Topic: delay embedding

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use