I am creating an interpreter for my esolang, and I need the user to enter text, which will then be interpreted as an INTERCAL program. I want the user to enter text that can contain any character, including newlines, until the user presses ^ X (Ctrl-X), for example:
Enter your code followed by ^X:
Bla
Blablabla
Bla^X
Thank you for entering your code
(lines 2, 3, and 4 were entered by the user)
Can someone explain to me how I can read input, including newlines, until the user goes into ^ X? thank
user142019
source
share