TryAPL: Difference between revisions

Jump to navigation Jump to search
337 bytes added ,  21:46, 27 June 2021
Line 32: Line 32:


If the output begins with a backspace character (U+08) then the actual output only begins after the second backspace character, and the text between the two backspace characters describes the role of the text. As 27 Jun 2021, only one tag has been implemented, <source lang=js inline>"\bhelp\b"</source> for which the text is the URL of help page requested by <source lang=apl inline>]Help</source>
If the output begins with a backspace character (U+08) then the actual output only begins after the second backspace character, and the text between the two backspace characters describes the role of the text. As 27 Jun 2021, only one tag has been implemented, <source lang=js inline>"\bhelp\b"</source> for which the text is the URL of help page requested by <source lang=apl inline>]Help</source>
A minimal (no-state) TryAPL front-end can be implemented as follows:
<source lang=js>
with(new XMLHttpRequest) {
open("POST", "tryapl.org/Exec");
setRequestHeader("Content-Type", "application/json;charset=utf-8");
send(JSON.stringify([0, 0, 0, prompt()]));
onload = (_ => alert(eval(responseText)[3].join("\n") + "\n"))
}
</source>


== In media ==
== In media ==

Navigation menu