Click here to Skip to main content
15,916,945 members
Home / Discussions / Java
   

Java

 
GeneralInteracting COM dlls from Java using JNI Pin
Shamant31-Jul-01 23:40
Shamant31-Jul-01 23:40 
GeneralInteracting COM dlls from Java using JNI Pin
Shamant31-Jul-01 23:36
Shamant31-Jul-01 23:36 
GeneralCommunicating with Javascript Pin
Robert Bushlow30-Jul-01 7:16
Robert Bushlow30-Jul-01 7:16 
Generalproblems using Image with netscape Pin
26-Jul-01 10:13
suss26-Jul-01 10:13 
Generalreport generation in java Pin
25-Jul-01 19:58
suss25-Jul-01 19:58 
Questionbyte or character stream? Pin
Flora23-Jul-01 15:19
Flora23-Jul-01 15:19 
GeneralStream Tokenizer Pin
Flora17-Jul-01 13:25
Flora17-Jul-01 13:25 
GeneralRe: Stream Tokenizer Pin
Malcolm McMahon18-Jul-01 3:50
Malcolm McMahon18-Jul-01 3:50 
Your problem is that the stream tokenizer isn't going to recognise "," as part of a number. There are two approaches I'd consider.

  1. Clear the tokenizer, then set 0-9 and , as "word" characters. Ignore every token but words, then, when you get a word, check that there are digits in it amongst the commas.
  2. Forget the tokenizer, read character by character and write a state based lexical analyser. This needn't be very complicated, the states are just "I'm in a number" and "I'm not in a number".
  3. The lexical analyser would look something like this.
    InputStreamReader is ...
    
    boolean isInANumber;
    int theNumber;
    int ch;
    
    do {
      ch = is.read();
      if(isInANumber) {
        if(Character.isDigit(ch))
          theNumber = theNumber * 10 + Character.digit(ch, 10);
        else if(ch != ',') {
          .... do something with theNumber
          isInANumber = false;
          }
        }
       else if(Character.isDigit(ch)) {
         isInANumber = true;
         theNumber = Character.digit(ch, 10);
         }
       }
      while(ch != -1);

GeneralRe: Stream Tokenizer Pin
Koundinya4-Aug-01 2:17
Koundinya4-Aug-01 2:17 
Generalsorting class XYObjArray Pin
23-Jun-01 12:12
suss23-Jun-01 12:12 
QuestionHow can i use the UDP in the Web ?? Pin
khamis22-Jun-01 7:44
khamis22-Jun-01 7:44 
Questionscreen mate using java swing? Pin
18-Jun-01 0:39
suss18-Jun-01 0:39 
GeneralAlternative to Java Applets Pin
13-Jun-01 10:12
suss13-Jun-01 10:12 
GeneralRe: Alternative to Java Applets Pin
Dhandapani Ammasai13-Jun-01 13:45
Dhandapani Ammasai13-Jun-01 13:45 
GeneralRe: Alternative to Java Applets Pin
Jack Mott17-Jul-01 12:30
Jack Mott17-Jul-01 12:30 
GeneralRe: Alternative to Java Applets Pin
pushpi5-Oct-01 18:22
pushpi5-Oct-01 18:22 
QuestionJava swing with IE? Pin
13-Jun-01 10:10
suss13-Jun-01 10:10 
AnswerRe: Java swing with IE? Pin
17-Jun-01 18:37
suss17-Jun-01 18:37 
AnswerRe: Java swing with IE? Pin
pushpi5-Oct-01 18:30
pushpi5-Oct-01 18:30 
AnswerRe: Java swing with IE? Pin
Malcolm McMahon9-Jan-02 3:08
Malcolm McMahon9-Jan-02 3:08 
GeneralError Message Pin
xpwork12-Jun-01 15:24
xpwork12-Jun-01 15:24 
GeneralRe: Error Message Pin
boul21-Jun-01 14:40
boul21-Jun-01 14:40 
GeneralJava StandAlone Pin
8-Jun-01 6:26
suss8-Jun-01 6:26 
GeneralRe: Java StandAlone Pin
Malcolm McMahon26-Jun-01 23:41
Malcolm McMahon26-Jun-01 23:41 
Generaladsf Pin
7-Jun-01 17:48
suss7-Jun-01 17:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.