Solved

equivalent of Chr$(ETX)...?

Posted on 2001-06-13
8
1,036 Views
Last Modified: 2008-02-01
Hi all,
  I am developing an application that sends command to machine and receives information from it.
In Visual Basic, I used  'Chr$(ETX)' to check if it is end of transmission.
But I have no idea on how to do if with Java prgm.
Does anyone know what is the equivalent code/method in JAVA?

Thanks alot
0
Comment
Question by:Howard888
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 5 total points
ID: 6190266
to get the ETX char in java, you would use:

  (char)3

OR:  more readable:

private static final char ETX = (char)3 ;

then you can just check if the character you read in equals ETX

if( charIn == ETX )
  // end of transmission...

Hope this helps, and is right ;-)

Good Luck!!

Tim.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 6190267
hehehe...  5 points ;-)

10 times easier than easy?

;-)

Tim.
0
 
LVL 92

Expert Comment

by:objects
ID: 6190468
Go Tim :)
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 92

Expert Comment

by:objects
ID: 6190475
And I won't tell anyone that you know VB.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 6190503
EEEK!  Thank god..  I was about to offer you money ;-) hehehe
0
 
LVL 35

Expert Comment

by:TimYates
ID: 7171281
Woo woo!!  I got a grade C!!  HAHAHAHAHAH!!!

Remind me never to do anything less than 50 points again...it's not worth scuffing the skin off my fingertips on my keyboard for... ;)

Ta

Tim.

0
 
LVL 92

Expert Comment

by:objects
ID: 7173173
Tim,

I would have given you an 'A'.

mick
0
 
LVL 35

Expert Comment

by:TimYates
ID: 7173730
Cheers fella :-)  Hee hee, and thanks for not telling anyone about my VB knowledge ;)
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This video teaches viewers about errors in exception handling.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question