Categories

See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

Where should I put the punctuation?

General Tech Learning Aids/Tools
Max. 2000 characters
Replies

usr_profile.png
Shiv Thapa

User

( 6 months ago )

In a few programming tutorials I am writing, I use quotations to indicate what the program should display if the output is short; such as:

The program should output "Hello World"

However, it irks me to have the sentence without any punctuation. Most websites that focus on essay writing state that the punctuation should go inside the quotation marks; but to me that implies that the punctuation is part of the output.

Should I write the sentence like this:

The program should output "Hello World".

Or should I use some other convention to indicate output when I type it inline with the text?

usr_profile.png
Jignesh Patel

User

( 6 months ago )

Neither. In this case, we are talking about programming, and "strings". It should be specific. If we aren't putting in a "." then we shouldn't say we are going to see one, even if it's grammatically correct.

When learning how to program, it is incredibly import to convey how sensitive the syntax is. Evey period (.) comma (,) semicolon (;) etc must be used with care. This is one of the common mistakes beginners make when learning how to write code. Forgetting to use a period in the middle of the syntax, or putting one where one doesn't belong can throw off the entire intended operation. So, to aid the experience of someone who is trying to learn such a specific skill, all of the documentation should he as clearly written as possible.

While adding the period to the end is grammatically correct according to the Yahoo Manual of Style as stated in another answer, why take the chance of introducing confusion if we are trying to drive home the point of how important periods are in a programming syntax? The simplest and most straightforward approach should be favored here, after all we are trying to help someone through a difficult and mentally exhaustive process. The easier it goes, the better.

To take that even one step further, you should remove even the quotes around "Hello World" and use italics, bolding, or color to emphasize the output.

I would also restructure the sentence so that the "Hello World" is not at the end. For example:

You should see Hello World on the screen.

This way you avoid the situation entirely.

what's your interest


forum_ban8_5d8c5fd7cf6f7.gif