When writing a statement with two line format you must be sure to type a semicolon at the end of the first line in order to ensure accurate results?

Didn't find what you need? Search our website or email us.

Show

The semicolon (;) has only one major use. It is used to join two complete sentences into a single written sentence when all of the following conditions are met:

(1) The two sentences are felt to be too closely related to be separated by a full stop; (2) There is no connecting word which would require a comma, such as and or but; (3) The special conditions requiring a colon are absent.

Here is a famous example:

It was the best of times; it was the worst of times.

A semicolon can always, in principle, be replaced either by a full stop (yielding two separate sentences) or by the word and (possibly preceded by a joining comma). Thus Dickens might have written:

It was the best of times. It was the worst of times. or It was the best of times, and it was the worst of times.

The use of the semicolon suggests that the writer sees the two smaller sentences as being more closely related than the average two consecutive sentences; preferring the semicolon to and often gives a more vivid sense of the relation between the two. But observe carefully: the semicolon must be both preceded by a complete sentence and followed by a complete sentence. Do not use the semicolon otherwise:

*I don't like him; not at all. *In 1991 the music world was shaken by a tragic event; the death of Freddy Mercury. *We've had streams of books on chaos theory; no fewer than twelve since 1988. *After a long and bitter struggle; Derrida was awarded an honorary degree by Cambridge University.

These are all wrong, since the semicolon does not separate complete sentences. (The first and last of these should have only a bracketing comma, while the second and third meet the requirements for a colon and should have one.) Here are some further examples of correct use:

Tolkien published The Hobbit in 1937; the first volume of The Lord of the Rings followed in 1954. The Cabernet Sauvignon grape predominates in the Bordeaux region; Pinot Noir holds sway in Burgundy; Syrah is largely confined to the Rhone valley. Women's conversation is cooperative; men's is competitive.

If a suitable connecting word is used, then a joining comma is required, rather than a semicolon:

Women's conversation is cooperative, while men's is competitive.

A semicolon would be impossible in the last example, since the sequence after the comma is not a complete sentence.

Note, however, that certain connecting words do require a preceding semicolon. Chief among these are however, therefore, hence , thus, consequently, nevertheless and meanwhile:

Saturn was long thought to be the only ringed planet; however, this is now known not to be the case. The two warring sides have refused to withdraw from the airport; consequently aid flights have had to be suspended.

Observe that in these examples the sequence after the semicolon does constitute a complete sentence. And note particularly that the word however must be separated by a semicolon (or a full stop) from a preceding complete sentence; this is a very common mistake.

There is one special circumstance in which a semicolon may be used to separate sequences which are not complete sentences. This occurs when a sentence has become so long and so full of commas that the reader can hardly be expected to follow it without some special marking. In this case, we sometimes find semicolons used instead of commas to mark the most important breaks in the sentence: such semicolons are effectively being used to mark places where the reader can pause to catch his breath. Consider the following example:

In Somalia, where the civil war still rages, western aid workers, in spite of frantic efforts, are unable to operate, and the people, starving, terrified and desperate, are flooding into neighbouring Ethiopia.

This sentence is perfectly punctuated, but the number of commas is somewhat alarming. In such a case, the comma marking the major break in the sentence may be replaced by a semicolon:

In Somalia, where the civil war still rages, western aid workers, in spite of frantic efforts, are unable to operate; and the people, starving, terrified and desperate, are flooding into neighbouring Ethiopia.

Such use of the semicolon as a kind of "super-comma" is not very appealing, and you should do your best to avoid it. If you find one of your sentences becoming dangerously long and full of commas, it is usually better to start over and rewrite it, perhaps as two separate sentences:

In Somalia, where the civil war still rages, western aid workers, in spite of frantic efforts, are unable to operate. Meanwhile the people, starving, terrified and desperate, are flooding into neighbouring Ethiopia.

In any case, don't get into the habit of using a semicolon (or anything else) merely to mark a breathing space. Your reader will be perfectly capable of doing his own breathing, providing your sentence is well punctuated; punctuation is an aid to understanding, not to respiration.

Copyright © Larry Trask, 1997

Maintained by the Department of Informatics, University of Sussex

When writing a statement with the two-line format, you must be sure to type a semicolon at the end of the first line in order to ensure accurate results. Although it is possible to block statements that depend on an if, you cannot likewise block statements that depend on an else.

Which of the following is a structure where you ask a question and depending on the answer you take one of two courses of action?

A sequence can contain any nyumber of tasks, but there is no chance to branch off and skip any of the tasks. With this you ask a question, and depending on the answer, you take one of two courses of action. Than, no matter which path you follow, you continue with the next task. Another name for a selection structure.

What tool helps programmers plan a program’s logic by writing plain English?

Understanding Logic-Planning Tools and Decision Making Pseudocode A tool that helps programmers plan a programs logic.

When you code an if statement within another if statement as in the following then the if statements are?

When there is an if statement inside another if statement then it is called the nested if statement. Statement1 would execute if the condition_1 is true. Statement2 would only execute if both the conditions( condition_1 and condition_2) are true.

What type of loop should you use to execute a body of statements continually as long as the Boolean expression that controls entry into the loop continues to be true?

When there is an if statement inside another if statement then it is called the nested if statement. Statement1 would execute if the condition_1 is true. Statement2 would only execute if both the conditions( condition_1 and condition_2) are true.

What type of statement can be used to make a single alternative decision?

loopStructures that allow repeated execution of a block of statementsiterationone loop executionwhile loopexecute a body of statements continually as long as the Boolean expression that controls the entry into the loop continues to be true28 more rows

When you compare strings with the == operator you are comparing their values not their memory addresses?

ABif statementUsed to make a single-alternative decisionblockOne or more statements contained within a pair of curly bracesnested ifA statement in which one decision structure is contained within anotherdual-alternative decisionsHas two possible outcomes24 more rows

What are the three structures of structured programming?

Structured programming (SP) is a technique devised to improve the reliability and clarity of programs. In SP, control of program flow is restricted to three structures, sequence, IF THEN ELSE, and DO WHILE, or to a structure derivable from a combination of the basic three.

Is a structure where you perform an action or task and then you perform the next action?

In a selection structure, you perform an action or task, and then you perform the next action in order. Repetition and sequence are alternate names for a loop structure. In a structured program, any structure can be nested within another structure.

What is a variation of the selection structure?

case structure. a variation of the selection structure, in which a single variable is checked for equality against many different values. condition. a starement comparing values, usually with a relational operator.

What is true of stacking structures?

Which is true of stacking structures? Each structure has only one point where it can be stacked on top of another. When you stack structures, the top structure must be a sequence. Two incidences of the same structure cannot be stacked adjacently.

Which type of programming structure involves choosing between alternative courses of action based on some value within a program?

What type of structure involves choosing between alternative courses of action based on some value within a program? Flowchart creators use diamond shapes to indicate alternative courses of action.

When you create a block you must place multiple statements within it?

loopStructures that allow repeated execution of a block of statementsiterationone loop executionwhile loopexecute a body of statements continually as long as the Boolean expression that controls the entry into the loop continues to be true28 more rows

What data type can hold 14 or 15 significant digits of accuracy?

When you create a block, you must place multiple statements within it. When you use nested if statements, you must pay careful attention to placement of any else clauses. In the switch structure, break is followed by one of the possible values for the test expression and a colon.

When code statement within another if statement as in the following if/then statements are If AB if CDX 0?

Terms in this set (20) When you code an if statement within another if statement, the statements are nested. What is the output of the following code segment?

When a one if else statement is enclosed in another if else statement it’s called as?

Nested If-else Statements When a series of decision is required, nested if-else is used. Nesting means using one if-else construct within another one.

What is if/then and if/then else statement?

When an If Then Else statement is encountered, condition is tested. If condition is True , the statements following Then are executed. If condition is False , each ElseIf statement (if there are any) is evaluated in order.

Can an If statement contain another if statement?

You can place or nest an If statement inside another If statement. When you nest If statements, you can check for a condition only when another condition is found to be true. When the first condition is found to be true, JAWS evaluates the nested If statement.

Which loop executes a body of statements continuously while a test condition continues to be true and uses the keyword while?

what is a while loop? executes a body of statement continuously while a test condition continues to be true; it uses the keyword while.

What is a structure that allows for repeated execution of a block of statements called?

Loop: A loop is referred to as a structure that enables repeated execution of a block of statements. A Boolean expression is evaluated within a looping structure. If the Boolean expression is true, then a block of statements known as the loop body is executed and the Boolean expression is evaluated again.

Is a kind of indefinite loop?

A counted loop is the same as an indefinite loop. Shortcut operators are a programmers only choice when incrementing or accumulating a variables value. You can initialize one or more variables in the first section of a for statement.

Is a special loop that is used when a definite number of loop iterations is required?

A for loop is a special loop that is used when a definite number of loop iterations is required. For loop have 3 sections, loop variable initialization, testing loop control variable, updating loop control variable.

How do you create a single-alternative decision structure in Alice?

How do you create a single-alternative decision structure in Alice? You create an If/Else instruction with an empty Else part. What is a nested if/Else instruction? A nested If/Else instruction is an If/Else instruction that is inside of another If/Else instruction.

What type of structure involves choosing between alternative courses of action based on some value within a program quizlet?

What type of structure involves choosing between alternative courses of action based on some value within a program? Flowchart creators use diamond shapes to indicate alternative courses of action.

What is a multiple alternative decision structure?

A multiple alternative decision structure allows you to test the value of a variable or expression and then use that value to determine which statement or statements to execute. The case or switch structure is a multiple alternative decision structure.