General Forum
Start a New Topic 
Author
Comment
View Entire Thread
Re: What punctuation do I need before the quotations? These are imperative sentences.

(1) Display the message: "Let's make a sorting algorithm!"
(2) In red font, display the message: "Hello, how are you?"


Just two things to watch out for. Use a colon (or a comma) before the message details and start the message with a capital letter since it is a sentence in its own right. Surrounding the message itself with quotation marks is useful but optional.

The sentences are imperatives, as you say. This is abundantly clear from the fact that the verb "display" is a plain (infinitive) verb-form. Further, in (1), but not (2) the message itself is also an imperative - a special kind called a let-imperative.



PaulM