This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes application to parse a command line string and evaluate it. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "application to parse a command line string and evaluate it." Watch "application to parse a command line string and evaluate it." New topic
Author

application to parse a command line string and evaluate it.

Randy Helene
Greenhorn

Joined: Apr 16, 2002
Posts: 21
I am writing a java application to parse a command line string such as java ParseEval 3.5 - 7.0 + 8.1. Only + and - operations are allowed. The string can contain spaces. I am at the point where I can find the position of the + or minus signs, but I am having trouble putting the numbers to be evaluated into a statement that can be evaluated. Can anyone help me with this? I am pretty new to java programming.
gautam shah
Ranch Hand

Joined: Oct 29, 2000
Posts: 72


uses:- java Eval 3 - 5 + 8 - 1 + 23 - 45
(edited by Cindy to shorten the display width)
[ April 16, 2002: Message edited by: Cindy Glass ]
Randy Helene
Greenhorn

Joined: Apr 16, 2002
Posts: 21
Thank you for your help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: application to parse a command line string and evaluate it.
 
Similar Threads
strings, string pool and garbage collection
Passing Comman Line arg in WS Application Developer
java class to parse a command line string
Another method of parsing a command line string
Append string to stringbuffer in same line