answersLogoWhite

0

The computer language has a grammar for the syntax. Not all computer languages using ; to end a statement.

The if-statements DO end with an ; (except when a <compound statement>) in C#, C, PHP, and Java (and many others). In fact, most of <statement> end with ; in those languages, and <if-statement> is just one of the derived <statement>.

However, for statements like: if (1 == 2) {} else {}, the {} is a <compound statement> which does not end with a ; syntactically.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Can you use a semicolon at the end of a sentence?

No. A full stop is used to show the end of a sentence. A semi colon can be used to separate clauses or items in a list.


When do you use a semicolon in algebra?

Well, according to what I learned when I was in Algebra I, you should never have to use a semicolon.


When to use simicolon?

Semicolon is a part of punctuation used mostly in coding. It denotes the end of line in many programming languages.


A sentence with the word semicolon?

I can give you several sentences.You use a semicolon to separate two clauses.A semicolon is like a comma with a period on top of it.You need to learn how to use the semicolon properly.


Can you use two semicolon in one sentennce?

NO


Can you use a gerund after a semicolon?

A gerund is a verb with the -ing suffix, often turning it from a verb into the subject of a sentence. It is grammatically correct to use one after a semicolon as long as the clause after the semicolon is still independent, that is, it can still stand alone as a separate sentence.


Why do have use semi colon in matlab?

In MATLAB, a semicolon is used to suppress the output of a command in the command window. When you place a semicolon at the end of a line, MATLAB executes the command without displaying the result, which helps keep the output clean and manageable, especially when working with large datasets or performing multiple operations. If you want to see the output, simply omit the semicolon.


How do you use semicolon in if sentence?

I wouldn't use a semicolon in a conditional (if) sentence. Semicolons can join two independent clauses without a conjunction. The "if" clause in a conditional sentence is dependent, not independent.


How do you use a semicolon in a series?

Example-They use they following things:pens, pencils, and markers


In which of the-following situations would it be appropriate to use a semicolon?

To replace conjunctions and, or, but and to connect the main clauses in a compound sentence


When should you not use a semicolon?

You should not use a semicolon to separate two independent clauses that are not closely related in meaning. Additionally, it is incorrect to use a semicolon before conjunctions like &quot;and,&quot; &quot;but,&quot; or &quot;or&quot; when they connect independent clauses. Semicolons should also be avoided when connecting dependent clauses or items in a list that already contain commas.


Can two independent clauses be joined by using a semicolon between the clauses without a conjunction?

Yes, that is one of the most common uses of a semicolon. If there is a conjunction joining the clauses, however, you should use a comma instead of a semicolon.