The Artima Developer Community
Sponsored Link

Java Answers Forum
VB to VJ++ transition

2 replies on 1 page. Most recent reply: Apr 28, 2003 5:40 AM by Vincent O'Sullivan

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 2 replies on 1 page
tuli herscovici

Posts: 1
Nickname: tuli01
Registered: Apr, 2003

VB to VJ++ transition Posted: Apr 27, 2003 3:23 PM
Reply to this message Reply
Advertisement
Two questions:

1. ========================
I am trying to do C=A+B.

I have this:

String AA = edit1.getText();
String BB = edit2.getText();
CC=AA+BB;
edit3.setText(CC);

I understand BB and AA are strings. How do I
reproduce the VB command AA=Val(text1.text)?

2. ==========================

in VB a command_click routine wih END would stop the application.
What woudl be the VJ++ coresponding routine


Thanks

Tuli01


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: VB to VJ++ transition Posted: Apr 27, 2003 5:45 PM
Reply to this message Reply
You want to use Integer.paseInt() to get the integer value of a string. Of course, if the string doesn't contain an integer value, you'll get a NumberFormatException.

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: VB to VJ++ transition Posted: Apr 28, 2003 5:40 AM
Reply to this message Reply
Assumming that type conversion in J++ is the same as in Java; check out the Java Conversion Amanuensis at: http://mindprod.com/amanuenses.html. It details how to conver any basic java type to any other.

Vince.

Flat View: This topic has 2 replies on 1 page
Topic: volatile keeps on escaping to me.. Previous Topic   Next Topic Topic: Version

Sponsored Links



Google
  Web Artima.com   

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