How do I fix this BASIC compilation error?
Date : March 29 2020, 07:55 AM
wish of those help I note that you've changed the code originally posted, deleting the duplicate line numbers That will make the first part of this answer look weird, but I'll leave it. The compiler is telling you that you're re-using the same line numbers. Notice the following section of code? 26 PRINT "DRIVE A: WILL BE LOST!"
27 INPUT "Proceed with Format (Y/N)"; F$
26 IF F$ = "Y" THEN GOTO 28
27 IF F$ = "N" THEN GOTO 16
15 IF I$ = "C:\WINDOWS\COMMAND.COM" THEN GOTO 14 ELSE GOTO 13
15 IF I$ = "C:\WINDOWS\COMMAND.COM" THEN GOTO 14
16 IF I$ <> "C:\WINDOWS\COMMAND.COM" THEN GOTO 13
|
Compilation error executing basic if else statements
Tag : java , By : John Phipps
Date : March 29 2020, 07:55 AM
should help you out I had a similar code to this using numbers, and it worked perfectly. This however keeps underlining the word else and I don't know why. I am just playing around with java trying to understand a few principles. , Never use == to compare strings. use .equals instead. if (input1.equals("Hello"))
if (input1.equalsIgnoreCase("Hello"))
if (input1 == "Hello");
if(input1.equalsIgnoreCase("hello") || input1.equalsIgnoreCase("hey") || input1.equalsIgnoreCase("hi"))
|
C compilation error for basic function
Date : March 29 2020, 07:55 AM
hop of those help? I'm trying to write my own version of strcat (I call it "append"). Here's what I have: , You have multiple problems with that short code. First you have
|
Basic Compilation Error in Web Application
Date : March 29 2020, 07:55 AM
|
Not understanding some basic compilation errors in Java
Tag : java , By : evegter
Date : September 28 2020, 07:00 PM
this will help #2 occures because c<8 is evaluated to a boolean which can't be added to an int. There is no compilation error in the line before because the boolean expression is converted to a String before being concatenated. Be aware that the order matters! While s = k + c + (c < 8) + "" is not a valid expression, s = "" + k + c + (c < 8) is one. #3 occures because the expression c + 1 evaluates to an int whose storage size is greater than that of a char, so it has to be cast like so: (char) (c + 1). #4 occures because you can't assign a String expression to a boolean variable Take a look at the specification of the + operator to understand what actually happens and to the narrowing primitive conversion section to see why the cast is needed.
|