[Question]
  [
Write a program with the following properties:
* When run as-is, the program produces no output (i.e. 0 bytes of output).
* There is a location within the program (of your choice: it could be at the start, end, or somewhere in the middle) with the following property: modifying the program via placing *any* string there will cause the resulting program to print that string when executed.
This must work regardless of whether the string contains quotes, backslashes, comment marks, delimiters, NUL bytes, etc.; no matter what you place there, the string is still interpreted as a string and printed entirely verbatim. You can, however, fail to handle very very long strings if they would cause the compiler to run out of memory, or the like (to be precise, you should at least be able to handle strings up to 1000 bytes long or three times the length of your program, whichever is longer).
An example of an *invalid* solution would be
```
print("");
#      ^ text goes here
```
in Python, Perl, Ruby, etc.; although it works for many strings, it will not work for a string containing a double quote, or a string containing the substring `\n` (which would be interpreted as a newline).
Note that this problem is probably impossible in most languages; the challenge is at least partially about finding a language where it works. Your chosen language must be a programming language under [this site's definition](http://meta.codegolf.stackexchange.com/a/2073/62131), e.g. no submitting a solution in [Text](http://esolangs.org/wiki/Text).
As this is a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), the shortest program template wins. However, do not be discouraged from submitting solutions even if they can't beat the current winner! You can still compete for second, third, etc. place, or simply to find as many answers where it works as possible. You should, however, ensure that your program meets the entire specification before submitting it; approximate solutions would miss the point of the problem.
  
[Answer]
## Excel, 1 byte
```
'
```
Ungolfed version
```
'        <-- print the following text,
             and exit the current formula
```
[Answer]
# Jolf, 6 bytes
```
a Lq6(
```
## Explanation
```
a Lq6(
a       print
  L 6   all but the first 6 characters of
   q    the source code
     (  and exit
```
[Answer]
# Zsh, 6 bytes
```
<<'
'
```
There is a trailing newline. The string is inserted at the end of the program.
# Bash, ~~20~~ 17 bytes
Thanks to [Adam](https://codegolf.stackexchange.com/users/62418/adam) for removing 3 bytes.
```
exec sed 1d "$0"
```
# \*nix shell script, ~~21~~ 14 bytes
Thanks to [Adam](https://codegolf.stackexchange.com/users/62418/adam) for removing 7 bytes.
```
#!/bin/sed 1d
```
[Answer]
# [Perl 5](https://www.perl.org/), ~~30~~ ~~21~~ 19 bytes
```
print<DATA>__END__
```
[Try it online!](https://tio.run/##K0gtyjH9/7@gKDOvxMbFMcTRLj7e1c8lPv6/kkdqTk6@ko5CeX5RTooil6ad3X8A "Perl 5 – Try It Online")
Trailing newline. This makes use of a Perl feature which allows arbitrary data to be appended to the source file, which can then be read via the `DATA` filehandle. When we give a filehandle as an argument to `print`, it's given a list context, which causes the filehandle to return a list of all the lines in the file, newlines included (likewise, a newline on the final line will be omitted). Then `print` implicitly concatenates them all, undoing the splitting into lines and giving us the exact original string regardless of where the newlines were.
Thanks to @Dada, who realised there was no need to handle newlines manually, and @ninjalj and @b\_jonas, who each spotted a character which could be golfed off.
[Answer]
# brainfuck ([Unreadable Brainfuck](http://esolangs.org/wiki/User:Marinus/Brainfuck_interpreters#Unreadable)), 9 bytes
```
,+[-.,+]!
```
Append the input to the end. There isn't a trailing newline, this time.
Looking for languages which would accept input appended to the end of the program, brainfuck seemed like a distinct possibility; many brainfuck interpreters written in esolangs take both the program and the program's input from standard input, and thus need some way to tell between them. There's a convention that's used in this case that a `!` character differentiates between the program and the input, a trick that's often used to write short brainfuck programs like `,[.,]!Hello, world!`; this basically creates a different dialect of brainfuck in which `!` has a different meaning from normal.
In theory, therefore, we could just find one of these interpreters and give it a `cat` program in order to fulfil the spec. There's a major subtlety, though; brainfuck typically uses 256 values for each cell, there are 256 octets, and one needs to be used for EOF. So if we want to be able to echo all 256 octets literally, we can't detect EOF at all and will need to end the program some other way. In other words, we need to find an implementation that either gives the 256 octets and EOF 257 different values, or that crashes on EOF.
Enter [Unreadable](http://esolangs.org/wiki/Unreadable). There's a brainfuck interpreter in Unreadable that predates this challenge, and which accepts input after an `!`; additionally, unlike most brainfuck interpreters, it uses bignum cells and -1 for EOF, allowing EOF to be distinguished from the other 256 possible octets. Thus, by use of Unreadable Brainfuck as the specific interpreter for the program, we can solve the challenge in just 9 bytes, via writing a brainfuck `cat` program that halts on EOF=-1.
Is it possible to do better? Well, we could try the following 7-byte program, which attempts to *output* EOF at the end of the string before it breaks out of the loop:
```
+[,.+]!
```
The behaviour of this program depends on the behaviour of the Unreadable interpreter on error conditions (thus, it depends not only on the implementation of brainfuck, but on the implementation used to *run* the implementation of brainfuck). Unfortunately, the Unreadable interpreter I use outputs errors on standard *output*, meaning that this saving doesn't work. If anyone knows of an Unreadable interpreter that exits on an attempt to output EOF, or silently skips the attempt, let me know; that would be a seven-byte solution right there.
[Answer]
# [Dyalog APL](http://goo.gl/9KrKoM), 11 [bytes](https://codegolf.meta.stackexchange.com/a/9429/43319)
The following is the body of the function *f*:
```
2↓⎕CR'f'⋄→
```
There is a trailing newline, after which anything may be inserted.
`2↓` drop the first two lines (header and this line) of
`⎕CR'f'` the **C**haracter **R**epresentation of *f*
`⋄` then
`→` quit
[Answer]
# Ruby, 20 bytes
```
print *DATA
__END__
```
Input goes at the end (after the trailing newline). The `DATA` idiom is one of many that Ruby [stole from Perl](https://codegolf.stackexchange.com/a/100934/11261).
Try it on eval.in: <https://eval.in/684370>
[Answer]
# JavaScript + HTML5 DOM, 163 Bytes
```
<html><body><script>fetch(location).then((r)=>r.text().then((t)=>console.log(t.slice(145,t.lastIndexOf("</b")))));document.body.remove()</script></body></html>
```
You may insert anything you like directly before the closing body tag. This works by fetching the page source and stripping the opening code and the closing tags.
The real kicker was figuring out how to escape an infinite loop. Putting `while(true){}` in the page blocks all callbacks forever, freezing the execution, and JavaScript has no way of pausing the main thread. However, code that no longer exists never runs, so the document body commits seppuku in the very last command, deleting itself while it waits for its clone to load.
Yeah, it's long and roundabout, but the mere fact that it's possible in JS is kind of amazing.
[Answer]
# PHP, 46 bytes
(including the trailing linebreak)
```
<?=join([""]+file(__FILE__));halt_compiler();
STRING HERE
```
Yes: even the `file` function is binary safe.
`[""]+` replaces the 0-index (first line of the file) with an empty string
[Answer]
# [gs2](http://github.com/nooodl/gs2), 4 bytes
```
╥¶=☼
```
Uses CP437 encoding. The string goes at the end. `╥` gets the source code, `¶` pushes 4, `=` drops that many leading characters, and `☼` exits.
[Try it online!](http://gs2.tryitonline.net/#code=4pWlwrY94pi8SGVsbG8sIFdvcmxkIQohQCMkJV4mKigp&input=)
[Answer]
# PHP 94 bytes
```
<?$f=fopen(__FILE__,'rb');fseek($f,93);while(false!==($c=fgetc($f)))echo$c;__halt_compiler();
```
Place your string after the final semicolon.
Yay for obscure features I guess? \_\_halt\_compiler() does exactly what you'd expect from the name. The prior code just opens the file and writes any bytes after that last semicolon to stdout. NUL, BEL etc come out fine. Unicode literals (♪) get screwed up on Windows but I think that's just Windows cmd failing at unicode.
[Answer]
# [Perl 6](https://perl6.org), 23 bytes
```
print $=finish
=finish
```
The string is placed starting on the newline after `=finish`.
[Answer]
# PHP, ~~48~~ 60 bytes
```
<?=substr(file_get_contents(__FILE__),60);__halt_compiler();STRING HERE
```
Just became aware that closing PHP does not prevent the string from containing `<?`.
[Answer]
# [Binary Lambda Calculus](https://tromp.github.io/cl/cl.html), 1 byte
```
 [text goes here]
```
That’s a single space (0x20) before the text.
[Try it online!](https://tio.run/##S8pJ/v/fAAqsFIwMTCwUzEzNkhXMks3SFIySjQwUzM2BLHMjkJiJkaECFHik5uTk6yiU5xflpCj@/w8A "Binary Lambda Calculus – Try It Online")
### How it works
0x20 = 001000002 is parsed as
```
00    λx.
01        x
0000  (ignored, can be anything)
```
(So in fact, any of the characters `!"#$%&\'()*+,-./` will work equally well.)
Since this is a complete expression, the remainder of the program is interpreted as input data, and under the binary lambda calculus I/O conventions, the identity function λ*x.* *x* copies the input directly to the output.
[Answer]
# Bash, 17 bytes
```
tail -n+3 $0
exit
<string here>
```
Developed independently of [jimmy23013's answer](https://codegolf.stackexchange.com/a/100933/41088).
[Answer]
# [RProgN](https://github.com/TehFlaminTaco/Reverse-Programmer-Notation), 19 Bytes
```
Q 19 Q L sub exit 
```
Note the trailing space.
Insert any text after that chunk and it will be printed.
Based off of [Lynn's](https://codegolf.stackexchange.com/users/3852/lynn) [gs2 answer](https://codegolf.stackexchange.com/a/100979/58375).
[Try it Online!](https://tehflamintaco.github.io/Reverse-Programmer-Notation/RProgN.html?rpn=Q%2019%20Q%20L%20sub%20exit%20Hello%2C%20World!&input=)
[Answer]
# Excel VBA, 6 Bytes
This is mainly to answer the question of how to print the text as held in [Adam's Answer](https://codegolf.stackexchange.com/a/101023/61846) to the Immediates Window in the VBA environment
## Basic Setup:
In cell *A1* in the activesheet the use the formula below to hold the string to be printed. *For the sake of byte counting this shall add 1 Byte*
```
'[Your Text Here]
```
eg:
```
'Hello 
World
```
## Immediates Window Function, 5 + 1 = 6 Bytes
```
?[A1]
```
+1 Byte for a `'` in cell A1
[Answer]
# Vim (in ex mode), 28 bytes
```
#!/bin/ex -c ':1d' -c ':wq'
[string]
```
28 bytes is including the last newline.
[Answer]
# Vim, 738 bytes
```
:imap <esc> <c-v><esc>
:imap <c-a> <c-v><c-a>
:imap <c-b> <c-v><c-b>
:imap <c-c> <c-v><c-c>
:imap <c-d> <c-v><c-d>
:imap <c-e> <c-v><c-e>
:imap <c-f> <c-v><c-f>
:imap <c-g> <c-v><c-g>
:imap <c-h> <c-v><c-h>
:imap <c-i> <c-v><c-i>
:imap <c-j> <c-v><c-j>
:imap <c-k> <c-v><c-k>
:imap <c-l> <c-v><c-l>
:imap <c-m> <c-v><c-m>
:imap <c-n> <c-v><c-n>
:imap <c-o> <c-v><c-o>
:imap <c-p> <c-v><c-p>
:imap <c-q> <c-v><c-q>
:imap <c-r> <c-v><c-r>
:imap <c-s> <c-v><c-s>
:imap <c-t> <c-v><c-t>
:imap <c-u> <c-v><c-u>
:imap <c-v> <c-v><c-v>
:imap <c-w> <c-v><c-w>
:imap <c-x> <c-v><c-x>
:imap <c-y> <c-v><c-y>
:imap <c-z> <c-v><c-z>
:imap <c-@> <c-v><c-@>
:imap <c-\> <c-v><c-\>
:imap <c-]> <c-v><c-]>
:imap <c-^> <c-v><c-^>
:imap <c-?> <c-v><c-?>
i
```
Rebinds all control characters in insert mode to `<c-v>`, followed by that control character, which will enter them literally.
^\_ (unit seperator) doesn't seem to need rebinding, as it gets outputted literally by default.
The variable text comes at the end, of course.
]