detokeniser
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
detokeniser [2018/04/17 15:47] – Added syntax highlighting tbest3112 | detokeniser [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Detokeniser===== | =====Detokeniser===== | ||
- | //by Jon Ripley, January 2008, May 2011//\\ \\ | + | //by Jon Ripley, January 2008, May 2011// |
+ | |||
+ | The // | ||
<code bb4w> | <code bb4w> | ||
DEF FNdetokenise(S$) | DEF FNdetokenise(S$) | ||
Line 54: | Line 57: | ||
=O$ | =O$ | ||
</ | </ | ||
- | \\ | + | |
==== Using FNdetokenise to list the error line ==== | ==== Using FNdetokenise to list the error line ==== | ||
- | \\ // | + | |
+ | // | ||
+ | |||
==== Using FNdetokeniser to write a Quine ==== | ==== Using FNdetokeniser to write a Quine ==== | ||
- | \\ | + | |
+ | Using // | ||
<code bb4w> | <code bb4w> | ||
P% = PAGE | P% = PAGE | ||
Line 71: | Line 78: | ||
END | END | ||
</ | </ | ||
- | In the author' | + | In the author' |
==== Using the built-in detokeniser ==== | ==== Using the built-in detokeniser ==== | ||
- | \\ | + | |
+ | The //BBC BASIC for Windows// and //BBC BASIC for SDL 2.0// interpreters have a built-in detokeniser accessed using the ***LIST** command that detokenises a specified file and outputs the listing on the current output device. Whilst it is possible to write a simpler looking detokeniser utilising ***LIST** the resulting routine is significantly slower due to the number of file operations required. | ||
<code bb4w> | <code bb4w> | ||
DEF FNdetokenise(S$) | DEF FNdetokenise(S$) | ||
Line 102: | Line 112: | ||
=S$ | =S$ | ||
</ | </ | ||
- | \\ \\ **Do not use** this version in production code. | + | |
+ | **Do not use** this version in production code. |
detokeniser.1523980047.txt.gz · Last modified: 2024/01/05 00:18 (external edit)