Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>One has to consider that C was not written to be a "Applications" programming language but a systems programming language. It would not be inaccurate to say it was designed expressly to rewrite Unix. With that in mind, there was no EMACS or VIM and your user interfaces were serial terminals. Multiline string declarations would seem a bit pointless on a system that did not have a multiline text editor. Furthmore string manipulation would not be a primary concern for someone looking write an OS at that particular point in time. The traditional set of UNIX scripting tools such as AWK and SED (amongst MANY others) are a testiment to the fact they weren't using C to do significant string manipulation.</p> <p>Additional considerations, it was not uncommon in the early 70s (when C was written) to submit your programs on PUNCH CARDS and comeback the next day to get them. Would it have eaten up extra processing time to compile a program with multiline strings literals? Not really it can actually be less work for the compiler. But you were going to comeback for it the next day anyhow in most cases. But nobody who was filling out a punch card was going to put large amounts of text that wasn't needed in there programs.</p> <p>In a modern environment, there is probably no reason not to include multiline string literals other than designer's preference. Gramatically speaking it's probably simpler because you don't have to take linefeeds into consideration when parsing the string literal.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload