• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in StreamTokenizer  RSS feed

 
Rizwan Ahmad
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am using StreamTokenizer to generate tokens. But the confusion I am having is that there is a field TT_NUMBER in StreamTokenizer which recognizes numbers. But I want to differentiate between Integers and Floating point numbers. Can anyone tell me how is that possible. I have written the following code:
BufferedReader readInput = new BufferedReader(new InputStreamReader(is));
str = new StreamTokenizer(readInput);
if (str.ttype == str.TT_NUMBER)
return Token_Number;
With Best Regards,
Rizwan.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!