- "Charles can be very sarcastic when he wishes.
- "When he wishes, Charles can be very sarcastic.
Is there a word for this kind of inversion?
One word is cataphora. Since the noun no longer precedes the pronoun that refers to it, that noun can be called a postcedent. Here's a bit from the wiki article on cataphora:
In linguistics, cataphora ... is used to first insert an expression or word that co-refers with a later expression in the discourse. example of strict, sentence-internal cataphora in English is the following sentence:
When he arrived home, John went to sleep.
In this sentence, the pronoun he (the anaphor) appears earlier than the noun John (the postcedent) that it refers to, the reverse of the normal pattern (anaphora), where a referring expression such as John or the soldier appears before any pronouns that reference it.
: Pragmatics and Discourse: A Resource Book for Students : A, B, C, D. Routledge. pp. 10–. ISBN 978-0-415-25357-4. Retrieved 19 May 2013."
In English this is possible because the inverted clause is subordinate to, or depends on, the following independent clause. It (probably) doesn't work in the opposite direction, i.e. inverting two independent clauses or placing a main clause before a subordinate clause, and leaving the pronoun in the now first clause to refer to a noun in the second.