6
1
Based on a comment by Jo King on my previous question (called 'Inverse-quotes-quine'), I present this new question. The rules are similar, but just, the opposite:
- If your program is run normally, all of the code not in the speech marks (
"
- double quotes) should be printed. - If your program is wrapped in double quotes (in turn inverting the speech marks), the code that is normally n̶o̶t̶ in quotes should be printed.
E.g:
Let's say you have the following code:
fancyStuff("myCode"); "I like".isGreat();
If I run it, I would expect an output of:
fancyStuff(
);
.isGreat();
However, if I wrapped it in quotes, I would get:
"fancyStuff("myCode"); "I like".isGreat();"
When this code is run, the expected output would be:
myCode
I like
Obviously, the above example is not a functional response in any language. Your job is to write the code that performs in this way.
Rules
- Standard loopholes apply.
- The printed values, in both quoted and unquoted forms, must be non-empty, or consist solely of whitespace. This also means that all programs must include at least one set of quotes.
- However, trailing/preceeding whitespace is allowed.
- The quoted and unquoted strings must print different results.
- No looking at your own code, required file names, etc.
- Unmatched quotes are disallowed
- If there are multiple strings, they can either be printed as newlines (as in the example), or in some other human-readable way - no arrays or objects
- This is code-golf, so shortest answer in bytes wins.
So, if i understand correctly, any answers in that question which print the same string for both raw and wrapped source is also valid to this one. – tsh – 2019-06-22T12:16:38.877
@tsh technically correct, but I should probably add a rule against that... – Geza Kerecsenyi – 2019-06-22T12:19:10.030