Here document: Difference between revisions

c's "multi-line strings" aren't heredocs, and don't fulfill this task as they don't preserve newlines
(→‎{{header|D}}: crystal solution)
(c's "multi-line strings" aren't heredocs, and don't fulfill this task as they don't preserve newlines)
Line 273:
BaCon intends to be a programming aid in creating tools which can be compiled on different platforms
(including 64bit environments). It tries to revive the days of the good old BASIC.</pre>
 
=={{header|C}}==
The program speaks for itself ;)
<lang C>
#include <stdio.h>
 
int main() {
puts(
"The Heredoc task was marked not implementable in C.\n"
"Frankly the person who did so seems to have little idea\n"
"of what C is capable of.\n"
"After all, what would one call this multiline string?\n"
"I may be old, but do not forget that it all started with me.\n"
"Ever enigmatic...\n\n"
"C "
);
 
return 0;
}
</lang>
Output:
<pre>
The Heredoc task was marked not implementable in C.
Frankly the person who did so seems to have little idea
of what C is capable of.
After all, what would one call this multiline string?
I may be old, but do not forget that it all started with me.
Ever enigmatic...
 
C
</pre>
 
=={{header|C sharp}}==
Line 2,349 ⟶ 2,318:
{{omit from|BASIC}}
{{omit from|BBC BASIC}}
{{omit from|C|C's "multi-line strings" don't fulfill the requirements of this task}}
{{omit from|Déjà Vu}}
{{omit from|Gambas}}
Anonymous user