[Question]
  [
*It's one of [these](https://codegolf.stackexchange.com/questions/132558/i-double-the-source-you-double-the-output) again :D*
Your task, if you wish to accept it, is to write a program/function (**without any uppercase letters**) that outputs/returns its string input/argument. The tricky part is that if I convert your source code to uppercase, the output must be reversed.
For simplicity, you can assume that the input is always a single line string containing only ASCII letters (`a-z`), digits (`0-9`), and spaces.
You do not need to handle empty input.
## Example
Let's say your source code is `abc` and its input is `hello`. If I write `ABC` instead and run it, the output must be `olleh`.
  
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 1 byte
```
r
```
Try it online [lowercase](https://tio.run/##yy9OTMpM/f@/6P//4Pzc1OCSosy8dAA) or [uppercase](https://tio.run/##yy9OTMpM/f8/6P//4Pzc1OCSosy8dAA)!
Finally a question which I (a dumb brain) can answer! Thanks for this easy, yet fun challenge! (I do feel great, even though it requires little effort to make an answer in 05AB1E.)
### Wait, how?
```
r # reverses the stack. (Which literally does not do anything since only the
  # implicit input is in the stack)
R # actually reverses the top string of the stack (Which is the implicit input).
  # at the end, the input is automatically printed.
```
[Answer]
# [Python 3](https://docs.python.org/3/), ~~61 50 49~~ 48 bytes
-1 thanks to benrg!
```
r=-1;ʳ=1;ᵖʳᵢⁿᵗ(ᵢⁿᵖᵘᵗ()[::r])
```
**[lower-cased](https://tio.run/##K6gsycjPM/7/v8hW19D61GZbQ@uHW6ed2vxw66JHjfsfbp2uAWNNe7h1BoivGW1lVRSr@f9/RmpOTj4A "Python 3 – Try It Online") / [upper-cased](https://tio.run/##K6gsycjPM/7/P8hW19D61GZbQ@uHW6ed2vxw66JHjfsfbp2uAWNNe7h1BoivGW1lFRSr@f9/RmpOTj4A "Python 3 – Try It Online")**
This works because
1. [PEP-3131](https://www.python.org/dev/peps/pep-3131/) was implemented in Python 3.0; and
2. These are the minimal length Unicode characters with no upper-case version which also normalise under the Normalization Form Compatibility Composition ([NFKC](https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms)) transformation to the basic latin characters one would normally use - [TIO](https://tio.run/##XZAxa8MwEIX3/IrbJNGmYLLZaCpkCXTwWjIokoyPypK4ypTmz7tyncSRH5q@e0/cu/ib@uAP09RRGGD0qIOxRiUFOMRACXygQTm82l0XCDSgzy@OiYt6B1nYZSglsJYtYFYk9IkzYq9gvZGMif@RdbP7bYzREhdzSm8zepv4tqsFQUIgw7V4oJ8enYVq9Sy@FwlVgVyO6p44igKPGbv7QuUf3ZyR2aG8Wa/A2cfx9J57ue3@ZQ9X9njWhaz6mqZW7quGZNUsgdtRP@u6PYs/).
Note that identifiers, like `r` and the function names `print` and `input`, may be written like this but not keywords, like `def` or `lambda`.
(See the [upper-casing](https://tio.run/##K6gsycjPM/7/v6AoM69EIzOvoLREQ1OvtKAgtUhDU/P//yJbXUPrU5ttDa0fbp12avPDrYseNe5/uHW6Bow17eHWGSC@ZrSVVVGsJgA) of the code.)
[Answer]
# Python 3, 48 bytes
```
ᵖʳᵢⁿᵗ(ᵢⁿᵖᵘᵗ()[::b'b'[0]%3-1])
```
[Lower: Try it online!](https://tio.run/##K6gsycjPM/7//@HWaac2P9y66FHj/odbp2vAWNMebp0B4mtGW1klqSepRxvEqhrrGsZq/v@fkZqTk69Qnl@UkwIA "Python 3 – Try It Online")
```
ᵖʳᵢⁿᵗ(ᵢⁿᵖᵘᵗ()[::B'B'[0]%3-1])
```
[Upper: Try it online!](https://tio.run/##K6gsycjPM/7//@HWaac2P9y66FHj/odbp2vAWNMebp0B4mtGW1k5qTupRxvEqhrrGsZq/v@fkZqTk69Qnl@UkwIA "Python 3 – Try It Online")
You can also verify that the [upper program is truly uppercase](https://tio.run/##K6gsycjPM/7/v6AoM69EQ@nh1mmnNj/cuuhR4/6HW6drwFjTHm6dAeJrRltZJaknqUcbxKoa6xrGairplRYUpBZpaGr@/w8A "Python 3 – Try It Online").
---
It's unlikely we can write a program for Python 3 just using ASCII - we have no `def`, no `lambda`, and no builtin function calls. Also, all the properties of existing builtin objects are lowercase so we can't access those either. So instead our strategy is to look for Unicode characters that:
* Are not uppercase
* NFKC normalise to the character we want
* NFKC normalise to the character we want even after uppercasing
The following code does exactly that.
```
from unicodedata import normalize
for c in 'printinput':
  for i in range(0x10ffff):
    if not chr(i).isupper() and normalize('NFKC', chr(i)) == normalize('NFKC', chr(i).upper()) == c:
      print(chr(i))
      break
  else:
    raise Exception('no')
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 1 [byte](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
ṛ
```
**[lower-cased](https://tio.run/##y0rNyan8///hztn////PAHLyAQ "Jelly – Try It Online") / [upper-cased](https://tio.run/##y0rNyan8///hzln////PAHLyAQ "Jelly – Try It Online")**
### How?
```
ṛ - Main Link: list of characters, S
ṛ - right argument (implicitly S)
  - implicitly print
Ṛ - Main Link: list of characters, S
Ṛ - reverse
  - implicitly print
```
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 10 [bytes](https://codegolf.meta.stackexchange.com/a/9429/43319 "When can APL characters be counted as 1 byte each?") ([SBCS](https://github.com/abrudz/SBCS ".dyalog files using a single byte character set"))
Anonymous tacit prefix function.
```
⌽⍣('a'∊⎕a)
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT////1HP3ke9izXUE9UfdXQ96puaqPk/7VHbhEe9fY@6mh/1rnnUu@XQeuNHbROBcsFBzkAyxMMz@H@agrpHak5Ovo5CeH5RToqiOgA "APL (Dyalog Unicode) – Try It Online")
`⌽⍣(`…`)` apply reverse the following number of times:
 `'a'∊⎕a` is "a" a member of the uppercase **a**lphabet? (0)
### Uppercased
```
⌽⍣('A'∊⎕A)
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT////1HP3ke9izXUHdUfdXQ96pvqqPk/7VHbhEe9fY@6mh/1rnnUu@XQeuNHbROBcsFBzkAyxMMz@H@agrpHak5Ovo5CeH5RToqiOgA "APL (Dyalog Unicode) – Try It Online")
`⌽⍣(`…`)` apply reverse the following number of times:
 `'A'∊⎕A` is "a" a member of the uppercase **A**lphabet? (1)
---
In Dyalog APL, `⎕A` is case-insensitive and always refers to the uppercase alphabet.
[Answer]
# [Perl 5](https://www.perl.org/) `-p`, ~~33~~, ~~25~~, 22 bytes
Thank's to @DomHastings who also had the same idea
```
m;$_=/.(?{$\=$&.$\})^/
```
uppercase
```
M;$_=/.(?{$\=$&.$\})^/
```
[Try it online!](https://tio.run/##K0gtyjH9/9/XWiXeVl9Pw75aJcZWRU1PJaZWM07///@M1Jyc/H/5BSWZ@XnF/3ULAA "Perl 5 – Try It Online")
[Answer]
# [R](https://www.r-project.org/), 122 bytes
```
`\103`=`\162\145\166`
`\151\156\164\124\157\125\164\1468`(c(`\165\164\1468\124\157\111\156\164`(`\163\143\141\156`(,""))))
```
[try it online!](https://tio.run/##K/r/PyHG0MA4wRZImRnFGJqYAmmzBC4g19QQiM2AXJMYQyMgNjUH0qYQvomZRYJGsgZIE0IEocwQrjUBrMYYKA/CYOEEDR0lJU0g@J@ZV1Ba8h8A "R – Try It Online")
[TRY IT ONLINE!](https://tio.run/##K/r/PyHG0MA4wRZImRnFGJqYAmmzBC4g19QQiM2AXJMYQyMgNjUH0qYQvomZRYKGswZIE0IEocwQrjUBrMYYKA/CYOEEDR0lJU0g@J@ZV1Ba8h8A "R – Try It Online")
Includes only one letter, the lone `c` in the middle. The rest uses octal codes to get the equivalent of
```
C=rev
intToUtf8(c(utf8ToInt(scan(,""))))
```
With the lowercase `c`, the `c` makes no difference: we convert the input to integers, concatenate it with nothing, and convert back to characters. With an uppercase `C`, the integer vector in the middle gets reversed before being converted back.
[Answer]
# JavaScript (ES6), 46 bytes
Takes and returns an array of characters.
### In lowercase
```
s=>s.map?s:s["\162\145\166\145\162\163\145"]()
```
[Try it online!](https://tio.run/##LcdNCoAgEEDhu7RRFw305yKwDlItxKwUc6KJrm8Frb73vL41mdMdVx5xtmlRiVRHsOujp5aGbCxkORZ18yp/35fV19nERTIYCYOFgCtf@AAAbLMhIJsEeHSRMyZEegA "JavaScript (Node.js) – Try It Online")
### In uppercase
```
S=>S.MAP?S:S["\162\145\166\145\162\163\145"]()
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/Y1i5Yz9cxwD7YKjhaKcbQzCjG0MQUSJtBaSDfzBjEVorV0PyfnJ9XnJ@TqpeTn66RphGtp6ennpGak5OvHqupl5Wfmaehrq6p@R8A "JavaScript (Node.js) – Try It Online")
---
# JavaScript (ES6), ~~74~~ 73 bytes
*Saved 1 byte thanks to @Shaggy*
Takes and returns a string.
### In lowercase
```
s=>s.big?s:[...s]["\162\145\166\145\162\163\145"]()["\152\157\151\156"]``
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@7/Y1q5YLykz3b7YKlpPT684NlopxtDMKMbQxBRIm0FpIN/MGMRWitXQBKkwBYqYmgOxIRCbKcUmJPxPzs8rzs9J1cvJT9dI01DPSM3JyVfX1PwPAA "JavaScript (Node.js) – Try It Online")
### In uppercase
```
S=>S.BIG?S:[...S]["\162\145\166\145\162\163\145"]()["\152\157\151\156"]``
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/Y1i5Yz8nT3T7YKlpPTy84NlopxtDMKMbQxBRIm0FpIN/MGMRWitXQBKkwBYqYmgOxIRCbKcUmJPxPzs8rzs9J1cvJT9dI01DPSM3JyVfX1PwPAA "JavaScript (Node.js) – Try It Online")
[Answer]
# [Haskell](https://www.haskell.org/), 38 bytes
```
_0(_1:_2)|'a'<'_'=_0 _2++[_1]
_0 _1=_1
```
[Try it online! (lowercase)](https://tio.run/##y0gszk7Nyfn/P95AI97QKt5Is0Y9Ud1GPV7dNt5AId5IWzs63jCWC8Q2tI03/J@bmJlnm5lXklqUmFyiohBv8D8xpzglJ/c/AA "Haskell – Try It Online")
```
_0(_1:_2)|'A'<'_'=_0 _2++[_1]
_0 _1=_1
```
[Try it online! (uppercase)](https://tio.run/##y0gszk7Nyfn/P95AI97QKt5Is0bdUd1GPV7dNt5AId5IWzs63jCWC8Q2tI03/J@bmJlnm5lXklqUmFyiohBv8D8xpzglJ/c/AA "Haskell – Try It Online")
Haskell requires that any variable name beginning with a capital letter is constructor of a declared type. This basically means we can't have any identifiers that start with a letter. (I think the options we actually have are `LT`, `GT`, and `EQ` but I wasn't able to find a use for any of these.) Luckily it is possible to write haskell programs without letters. We can start variable names with `_` and we add numbers to the end to make it a valid name (certain symbols would work too).
To detect that which mode we are in we use the fact that strings change and do a comparison between a changing and static string, `'a'<'_'` evaluates to `False` while `'A'<'_'` is true.
[Answer]
# [Ruby](https://www.ruby-lang.org/) `-p`, ~~51~~ ~~49~~ ~~47~~ 46 bytes
*Saved a byte by using a shorter lexicographical comparison taken from [@WheatWizard's Haskell answer](https://codegolf.stackexchange.com/a/211281/92901).*
### Lowercase
```
?a<?_&&(f=->_{/.$/?($_=$`;f[_+=$&]):$_=_})['']
```
[Try it online!](https://tio.run/##KypNqvz/3z7Rxj5eTU0jzVbXLr5aX09F315DJd5WJcE6LTpe21ZFLVbTCsiPr9WMVleP/f8/IzUnJ/9ffkFJZn5e8X/dAgA "Ruby – Try It Online")
`?a<?_` tests whether the character `a` is lexicographically less than the character `_`. The test returns `false`, short-circuiting the `&&` operator so that none of the remaining code is actually executed. The input is printed automatically thanks to the `-p` flag.
### Uppercase
```
?A<?_&&(F=->_{/.$/?($_=$`;F[_+=$&]):$_=_})['']
```
[Try it online!](https://tio.run/##KypNqvz/397Rxj5eTU3DzVbXLr5aX09F315DJd5WJcHaLTpe21ZFLVbTCsiPr9WMVleP/f8/IzUnJ/9ffkFJZn5e8X/dAgA "Ruby – Try It Online")
Now we test whether `A` is lexicographically less than `_`. Here the comparison returns `true` so we proceed past `&&`. The code after `&&` defines and calls a recursive lambda that reverses the input, which (because of `-p`) has been stored in the predefined global variable `$_`:
```
(F=->_{      # define a lambda F with parameter _
  /.$/?(     # if $_ contains at least one character, match the last one, then
    $_=$`;     # remove that character from $_
    F[_+=$&]   # recursively call F, appending that character to _
  ):$_=_     # else set $_ to _, which now contains the full reversed input
})['']       # call F, initialising _ to the empty string
```
Finally, `$_` (now containing the reversed input) is printed automatically thanks to the `-p` flag.
[Answer]
## Windows NT Batch + coreutils, 28 bytes
```
@if %os:~9%==t (tac)else cat
```
Explanation: `%OS%` contains `Windows_NT` and the substring starting at position `9` is compared with the letter `t`. If the batch file is uppercased then the comparison succeeds and `tac` is invoked otherwise `cat` is invoked.
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 24 bytes
```
#[[i=1;i^2;;-i^2;;i^2]]&
```
[Try it online!](https://tio.run/##bcqxCsMgEADQ/T7jhEzp0K4SEEL2QtNJLFzlgkKiog6Fkm83pWu7vOltVB1vVL2ltgzYhNZ@OEv/uEh5@vrBmK4h3CwFDZN1UQm4Zh@qnuP0SplL8THoxajRUSZbORclzL8zx3tKnEcqrH5@178BHa9rxB6QnhZhN@0A "Wolfram Language (Mathematica) – Try It Online")
`I` is the built-in symbol for the imaginary unit \$i\$. Its value cannot be overridden without `Unprotect`ing it first.
[Answer]
# [J](http://jsoftware.com/), 21 14 bytes
```
|.^:({.\:'a_')
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/a/TirDSq9WKs1BPj1TX/a3KlJmfkK6QpqGek5uTkq3NxpdvqKSAUOQIVcUHUpMPU/AcA "J – Try It Online")
*-7 bytes thanks to Adam!*
Taking inspiration from [Adam's APL answer](https://codegolf.stackexchange.com/a/211230/15469).
## how
* `|.^:` Reverse the following number of times...
* `:({.\:'a_')` Grade down `\:` the string `a_` and take the first element `{.`.
	+ "Grade down" returns a list of indexes for the string, sorted descending. Thus `\:'abc'` would return `2 1 0`, for example.
	+ "Grade down" will thus return `0` for the string `a_`, and `1` for the string `A_`, since `_` is between `a` and `A` in the ascii alphabet.
[Answer]
# [APL (Dyalog Extended)](https://github.com/abrudz/dyalog-apl-extended), 9 bytes
```
⌽⍣(<×'a')
```
[Try it online (both lower and upper)!](https://tio.run/##SyzI0U2pTMzJT9dNrShJzUtJTfn//1HP3ke9izVsDk9XT1TXROY6qmtypRk@apvwqLfvUVfzofWmj9omPuqbGhzkDCRDPDyDudKMkKRN0KX/pxkqqCcmJasD1UEYAA "APL (Dyalog Extended) – Try It Online")
In Extended, `×` (signum) on letters queries the letter case, giving -1 for lowercase and 1 for uppercase. Then `<` has implicit left arg of 0, so it tests if the right arg is positive (1) or not (0). Therefore, `<×'a'` evaluates to 0 and `<×'A'` evaluates to 1.
[Answer]
# [V (vim)](https://github.com/DJMcMayhem/V), 2 bytes
```
væ
```
[Try it online!](https://tio.run/##K/v/v@zwsv//PVJzcvJ1FMrzi3JSFAE "V (vim) – Try It Online")
And uppercased:
```
Væ
```
[Try it online!](https://tio.run/##K/v/P@zwsv//PVJzcvJ1FMrzi3JSFAE "V (vim) – Try It Online")
Hexdump:
```
00000000: 76e6                                     v
```
## How?
`v` enters 'visual mode' and begins selecting characters. At first, only 1 character will be selected. Then `æ` reverses every character that is selected. Reversing only 1 character does nothing.
But `V` will select every character on the current line, and then `æ` flips the whole line.
[Answer]
# [Forth (gforth)](http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/), 61 bytes
```
: f 'a 65 = if bounds 1- swap 1- -do i c@ emit 1 -loop then ;
```
[try it online!](https://tio.run/##XYy9CsIwGEV3n@LYxSlDBzsogqNv4JzmxwZiv5CkiE8f2006He65cLzkOqmX39DaBc9JM5y5ETyjLLMt9Iry0WmjskLA3HHvUOlRUSRRJzdzbaVDj6ZbG/WbHCYfVrObDxej8JQc7fHvaj8 "Forth (gforth) – Try It Online") [TRY IT ONLINE!](https://tio.run/##S8svKsnQTU8DUf//Wym4Kag7KpiZKtgqeLopOPmH@rkEKxjqKgSHOwaAaF0XfwVPBWcHBVdfzxAFQwVdH3//AIUQD1c/Bev/xUoKiUnJSgppCslFXEAOguWRmpOTrxCeX5SToggR/Q8A "Forth (gforth) – Try It Online")
A challenge where the case insensitivity of Forth has a use ... except that you don't have a string reversal built-in, so you have to loop through the string itself in reverse.
Almost all words in Forth are case-insensitive. The only case-sensitive part in the code is `'a` or `'A`, where the char's ASCII code (97 for `a`, 65 for `A`) is pushed to the stack. So we can compare it with a (trivially case-insensitive) numeric literal `65`. If they're equal, the string is printed in reverse. Otherwise, the string is returned as-is.
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 3 bytes
```
ṡ↔|
```
and
```
Ṡ↔|
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/pf/XDnwkdtU2pqH@7qVANyFsA4/6ES//8rpeXnJyUWKQEA "Brachylog – Try It Online")
```
ṡ↔
ṡ   if input is a square matrix,
Ṡ   if input is a string,
 ↔   it is reversed
  | otherwise return input unaltered
```
[Answer]
## PowerShell 7+, 56, 35 bytes
```
-join"$args"['a'[0]-97?99..0:0..99]
# save as golf.ps1 and call .\golf.ps1 "string"
# e.g. (running in anonymous function &{} for demo):
PS C:\> &{-join"$args"['a'[0]-97?99..0:0..99]} '123 Alice'
123 Alice
PS C:\> &{-JOIN"$ARGS"['A'[0]-97?99..0:0..99]} '123 Alice'
ecilA 321
```
With golfing suggestions from [mazzy](https://codegolf.stackexchange.com/users/80745/mazzy).
Assuming the string is <= 100 characters. Change both the 99s to 1e5 notation for +2 bytes, much longer inputs, and much much slower code.
### old 56 byte version
```
&{$a="$args";(gv a).name[0]-97?-join$a[$a.length..0]:$a}
e.g.
PS C:\> &{$a="$args";(gv a).name[0]-97?-join$a[$a.length..0]:$a} "123 Alice"
123 Alice
PS C:\> &{$A="$ARGS";(GV A).NAME[0]-97?-join$A[$A.LENGTH..0]:$A} "123 Alice"
ecilA 321
```
The parameters to the anonymous function `{}` appear in the automatic variable `$args` and get stored in variable `$a`. String quotes `"$args"` cast to a single string. PowerShell is indifferent about the case of variable names, command names, property names, operator names, etc. so all the code runs in either case. `gv` is `get-variable` which looks for the `a` variable, finds its `.Name` (`a` or `A` depending on the case of the script - case is preserved), gets character [0] which is `a` or `A` again but this time as a `[char]` type, subtracts 97 (lowercase `a` value in ASCII), and `? :` ternary operators whether that hit zero or non-zero, and either prints the original or reverse-indexes the characters and joins them into a reversed string. Printing is implicit. `&{}` runs the anonymous function.
NB. TIO.Run only has PowerShell 5 or 6 at the time of writing, and ternary ?: is not in that version.
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 6 bytes
```
[r_]@1
```
This is a function solution. Since it relies on the recently added unary `R` operator, it doesn't work on TIO, but a similar 7-byte version does:
```
[rv_]@2
```
[try it online!](https://tio.run/##K8gs@K/xP7qoLD7Wwei/kkdqTk6@jkJ4flFOiqKS5n8A "Pip – Try It Online") or [TRY IT ONLINE!](https://tio.run/##K8gs@K/xPzooLD7Wwei/kkdqTk6@jkJ4flFOiqKS5n8A)
### Explanation
Lowercase:
```
[  ]    Make a list containing
 r       A random number between 0 and 1;
  _      The identity function
    @1  Get the item at index 1 (the identity function)
```
Uppercase:
```
[  ]    Make a list containing
 R_      A function that reverses its argument
    @1  Get the item at index 1, with cyclical indexing (the function)
```
The TIO version is the same idea, but uses the `RV` operator for reverse. It therefore has three items in the lowercase list (including `v`, which is -1) and gets the function using index 2 instead of 1.
[Answer]
# [Raku](http://raku.org/), 28 bytes
```
{.?"{'flip'~^'    '}"()||$_}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/Ws9eqVo9LSezQL0uTl0BCNRrlTQ0a2pU4mvBitIVbBUgitx8PAMwFVkrFCdWKqjEa6hnpObk5CuU5xflpKhrKqTlFwFt0AEaYP0fAA "Perl 6 – Try It Online")
* `$_` is the input to the function. Method calls lacking an explicit invocant are called on it.
* `flip` is the method to reverse a string.
* `$obj."name"()` is the syntax to call a method where the name is a string. The double quotes can contain interpolated values as usual.
* `$obj.?method` means to call `method` on `$obj` if that method is defined for it, and otherwise return `Nil`.
* `~^` is the stringy exclusive-or operator, which exclusive-ors the corresponding characters of its operands.
Putting it all together, the uncapitalized program xors `flip` and a string containing four spaces, producing `FLIP`. That method is not defined for strings, so the `.?` method call returns `Nil`. Then `Nil || $_` evaluates to the original string. When the source code is uppercased, `flip` becomes `FLIP`, which when xor-ed with the spaces becomes `flip`, which when called on the input string, reverses it.
[Answer]
# [SNOBOL4 (CSNOBOL4)](http://www.snobol4.org/csnobol4/), 61 bytes
```
	&lcase 'a'	:f(r)
	output =input
r	output =reverse(input)
end
```
[Try it online!](https://tio.run/##K87LT8rPMfn/n1MtJzmxOFVBPVGd0ypNo0iTizO/tKSgtETBNjMPSHEVwflFqWWpRcWpGmBxTa7UvJT//wE "SNOBOL4 (CSNOBOL4) – Try It Online")
SNOBOL by default case-folds identifiers and labels (unless `&CASE` is set to `0` or the flag `-CASE 0` is used at the start of the program), so the only thing that really changes is the `'a' -> 'A'`, as SNOBOL uses case-sensitive pattern matching. Since `'A'` is not lowercase, it jumps to the label `R`, which reverses.
[Answer]
# [Klein](https://github.com/Wheatwizard/Klein) 0X0, 68 bytes
*Works in both 000 and 010*
## Lower case
```
"a`"1+-+?@      \
/!?:    (0)?/!?:<@?
>$:?!\?>:?!\\(  /
\   (/ \  )/
```
[Try it online!](https://tio.run/##y85Jzcz7/18pMUHJUFtX295BAQxiuPQV7a1ALA0DTXsQ28bBnstOxcpeMcbeDkTGaCgo6HPFgFToKwApTf3////rJv83MDD4n1ickpudCwA "Klein – Try It Online")
## Upper case
```
"A`"1+-+?@      \
/!?:    (0)?/!?:<@?
>$:?!\?>:?!\\(  /
\   (/ \  )/
```
[Try it online!](https://tio.run/##y85Jzcz7/1/JMUHJUFtX295BAQxiuPQV7a1ALA0DTXsQ28bBnstOxcpeMcbeDkTGaCgo6HPFgFToKwApTf3////rJv83MDD4n1ickpudCwA "Klein – Try It Online")
---
Most of this is just a program that reverses the input, which is not exactly easy in Klein.
```
>:?!\?)0(    :?!\?@
\  (//!?:<?/!?:$<
     \)  / \(   /
```
[Try it online!](https://tio.run/##y85Jzcz7/9/Oyl4xxl7TQEMBCMBsB64YBQUNfX1FeysbexCpYsMFklSI0VRQ0FeIAanU////v27yfwMDg/@JxSm52bkA "Klein – Try It Online")
To do the condition we have the very simple
```
"a`"1+-+?@
```
Which is an expression that is exactly zero, but becomes something else when `a` is capitalized. This is pretty much the exact method used by every other answer. The `?@` means that when it is zero it halts immediately (a cat program). Otherwise we continue execution to the reverse program bit.
[Answer]
# [JavaScript (V8)](https://v8.dev/), 46 44 then by tch: 37 bytes
```
$=([o,...a])=>o?o.sub?o+$(a):$(a)+o:a
```
[Try it online!](https://tio.run/##fYwxDsIwEAT7vMKyUpwVuBoFmRS8gQoh5TAXCHI4yzb@viE9otliNLNPKpRcnEPell11cmNl1VhbC2fZICJdjD3IIJje10G6Fsj063TSUx0xx3kBs28aLuRBT1arTq0vX@bklcQzernDBPrB3os2v2TMcgqB45ESg/mT1g8 "JavaScript (V8) – Try It Online")
Thanks to [tsh](https://codegolf.stackexchange.com/users/44718/tsh) for saving 7 bytes!.
Recursive function `$` takes a string and destructures it into the first character `o` and an array `a` of the remaining characters.
If lower case, `o` has a property `sub` it returns the forward string `o+$(a)`.
Otherwise, `O` has no property `SUB` and it returns the reverse string `$(A)+O`.
The final iteration happens when `$` is called with and empty array so there is no `o`. Here it returns `a`, an empty array `[]` which acts as and empty string `""` in string addition.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal) -v, 24 bytes
```
ternaryless"a""_"reverse
```
[Try it online!](https://tio.run/##S85ILErOT8z5/78ktSgvsagyJ7W4WClRSSleqSi1LLWoOPX/f2eYGt0yAA "Charcoal – Try It Online") In upper case:
```
TERNARYLESS"A""_"REVERSE
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z/ENcjPMSjSxzU4WMlRSSleKcg1zDUo2PX/f2eYGt0yAA "Charcoal – Try It Online") Explanation: If `a` or `A` as appropriate is less than `_`, the ternary then reverses the implicit input, otherwise just takes implicit input. The result is then implicitly printed.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 1 [byte](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
## Lowercase
```
ô
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=9A&input=ImFiY2RlZiI)
Partitions the input at falsey characters, but there's no such thing as a falsey character in JavaScript.
## Uppercase
```
Ô
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=1A&input=ImFiY2RlZiI)
The shortcut for `w<space>`, Japt's built-in for reversing.
[Answer]
# [Coconut](http://coconut-lang.org/), 21 bytes
```
_->_[::('a'>'_')*2-1]
```
[Try it online!](https://tio.run/##S85Pzs8rLfmfZhvzP17XLj7aykpDPVHdTj1eXVPLSNcw9r96RmpOTr66Qo2dQhqIKCjKzCv5DwA "Coconut – Try It Online")
[Try it uppercased!](https://tio.run/##S85Pzs8rLfmfZhvzP17XLj7aykpD3VHdTj1eXVPLSNcw9r96RmpOTr66Qo2dQhqIKCjKzCv5DwA "Coconut – Try It Online")
[Answer]
# [Keg](https://github.com/JonoCode9374/Keg), 9 bytes
```
?r\{9-=[^
```
[try it online!](https://tio.run/##y05N///fviim2lLXNjru/3/HpGQA "Keg – Try It Online")
[TRY IT ONLINE!](https://tio.run/##y05N///fviim2lLXNjru/3/HpGQA "Keg – Try It Online")
Somehow, by making the answer valid, I saved bytes.
[Answer]
# [MAWP](https://esolangs.org/wiki/MAWP), 19 bytes
```
%|11a{%%0~}<%0/>[;]
```
[try it!](https://8dion8.github.io/MAWP/v1.1?code=%25%7C11a%7B%25%250%7E%7D%3C%250%2F%3E%5B%3B%5D&input=Hello) or [TRY IT!](https://8dion8.github.io/MAWP/v1.1?code=%25%7C11A%7B%25%250%7E%7D%3C%250%2F%3E%5B%3B%5D&input=Hello)
MAWP ignores lowercase letters, so this answer uses a conditional to check if subtraction has happened or not, and reverses based on it.
[Answer]
# [oK](https://github.com/JohnEarnest/oK), 13 bytes
```
.:9+23*7!"!g"
```
[Try it online!](https://tio.run/##y9bNz/7/P81Kz8pS28hYy1xRSTFdicsNme@uxMWlkaaUWpGYW5CTqsSl4KbkGuHoG@DjqqT5/z8A "K (oK) – Try It Online")
Explanation:
```
         "!g" /magic string
  9+23*7!     /9 + 23 * (ascii value mod 7)
.:            /eval ascii values as a string
```
When the input is `"!g"` it becomes `"||"` which is evaluated as reversing twice.  
When the input is `"!G"` it becomes `"| "` which is evaluated as reversing once.
## [oK repl](https://johnearnest.github.io/ok), 10 bytes
I'm going to say that this one doesn't count, because it relies on the fact that the oK repl works in mysterious ways.
```
.:4*54!"u"
```
[Try it in repl!](http://johnearnest.github.io/ok/?run=%20f%3A.%3A4%2a54%21%22u%22%3BF%3A.%3A4%2a54%21%22U%22%3B%28f%22example%22%3BF%22EXAMPLE%22%29 "oK repl")
When the input is `"u"` it becomes `"$"` which evaluates as "string of expression". In the repl it is a noop when applied to strings.  
When the input is `"U"` it becomes `"|"` which evaluates as reversing.
[Answer]
# Excel VBA, 58 bytes
Lowercase:
```
sub r(s)
if asc("a")=65then s=strreverse(s)
[a1]=s
end sub
```
Uppercase:
```
SUB R(S)
IF ASC("A")=65THEN S=STRREVERSE(S)
[A1]=S
END SUB
```
Output is to the cell `A1` of the currently active sheet (if this is in a module) or the parent sheet (if this is in a sheet object). I'm a little concerned this doesn't comply with the spec, though, because VBA auto-formats much of the code once it's input:
```
Sub r(s)
If Asc("a") = 65 Then s = StrReverse(s)
[a1] = s
End Sub
```
Of course, the standard has been to not consider the extra formatting in the byte count so I presume we can also ignore the capitalization. Really, I'm more worried about the answer being too straightforward to be interesting rather than that technicality.
]