![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 | |
|
Professional Programmer
|
Re: Snytax error
Quote:
Chris
__________________
Steven Skiena - Algorithms ,[->+>+<<]>>[-<<+>>]>++++++++[-<++++++++>]<+[-<->]>+<<[[-]+++++++++++++++.[-]>]>>[+++++++++.[-]],brainf**k -- It's such a pretty language |
|
|
|
|
|
|
#12 |
|
Programmer
Join Date: Mar 2008
Posts: 35
Rep Power: 0
![]() |
Re: Snytax error
what do you mean?? i didn't get what you are trying to explain..
|
|
|
|
|
|
#13 |
|
Professional Programmer
|
Re: Snytax error
break; attempts to break out of a loop, you have no loop to break out of. Any better?
__________________
Steven Skiena - Algorithms ,[->+>+<<]>>[-<<+>>]>++++++++[-<++++++++>]<+[-<->]>+<<[[-]+++++++++++++++.[-]>]>>[+++++++++.[-]],brainf**k -- It's such a pretty language |
|
|
|
|
|
#14 |
|
Programmer
Join Date: Mar 2008
Posts: 35
Rep Power: 0
![]() |
Re: Snytax error
you mean there is no loops so that why it is giving me an error so it needs a loop to break it.... is that what are you trying to say?
|
|
|
|
|
|
#15 |
|
Professional Programmer
|
Re: Snytax error
yes pretty much lol, sorry im at college in the middle of a basic ICT lesson so its kinda hard to answer.
__________________
Steven Skiena - Algorithms ,[->+>+<<]>>[-<<+>>]>++++++++[-<++++++++>]<+[-<->]>+<<[[-]+++++++++++++++.[-]>]>>[+++++++++.[-]],brainf**k -- It's such a pretty language |
|
|
|
|
|
#16 |
|
Programmer
Join Date: Mar 2008
Posts: 35
Rep Power: 0
![]() |
Re: Snytax error
loool... i am specialising in programming now.... college student just like you loool.... but it seems that you have a great foundation in programming...
|
|
|
|
|
|
#17 | |
|
Professional Programmer
|
Re: Snytax error
Quote:
Have you resolved the problem? Chris
__________________
Steven Skiena - Algorithms ,[->+>+<<]>>[-<<+>>]>++++++++[-<++++++++>]<+[-<->]>+<<[[-]+++++++++++++++.[-]>]>>[+++++++++.[-]],brainf**k -- It's such a pretty language |
|
|
|
|
|
|
#18 |
|
Programmer
Join Date: Mar 2008
Posts: 35
Rep Power: 0
![]() |
Re: Snytax error
yea i did... thanks
![]() |
|
|
|
|
|
#19 |
|
Professional Programmer
|
Re: Snytax error
Good Good, nice to see you worked it out.
Cheers, Chris
__________________
Steven Skiena - Algorithms ,[->+>+<<]>>[-<<+>>]>++++++++[-<++++++++>]<+[-<->]>+<<[[-]+++++++++++++++.[-]>]>>[+++++++++.[-]],brainf**k -- It's such a pretty language |
|
|
|
|
|
#20 |
|
Programmer
Join Date: Mar 2008
Posts: 35
Rep Power: 0
![]() |
Re: Snytax error
i added into
int z=Integer.parseInt(Option0);
if (z == 0){// 0 is the number of exiting for the programme
break;it shows unreachable statement in here: while(true){// while true starts for looping
String menu="Enter your Option:\n " ;
// the menu starts and converting ways of minute, hour, day, year, month, week and year
String Option1= "1- Convert from Minute to Hour 2- Convert from Hour to Minute \n";
String Option2= " 3- Convert from Day to Hour 4- Convert from Hour to Day \n";
String Option3= " 5- Convert from Days to Week 6- Convert from Week to Days \n";
String Option4= " 7- Convert from Year to Weeks 8- Convert from Weeks to Year \n";
String Option5= " 9- Convert from Months to Year 0- Exit";
String choose= JOptionPane.showInputDialog(menu + Option1 + Option2+ Option3+ Option4+Option5);
// to dispaly the menu in input dialog so the user can enter any number from above
int num = Integer.parseInt(choose);}so what is the solution?? ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic Socket Programming Error in Linux.. Pls help | boraciner | C++ | 18 | Sep 12th, 2007 1:17 AM |
| C# corruption!!! | Kilo | C++ | 32 | May 21st, 2006 8:44 PM |
| Masm | rsnd | Assembly | 4 | May 20th, 2006 9:05 PM |
| libraries | matko | C | 1 | Jan 22nd, 2006 2:12 PM |
| String error in if statement | Blighttdm | C | 12 | Nov 18th, 2005 6:34 PM |