Skip to navigation

BBC Micro Elite

Text: RTOK

Name: RTOK [View in context] Type: Macro Category: Text Summary: Macro definition for recursive tokens in the recursive token table
The following macro is used when building the recursive token table: RTOK n Insert recursive token [n] * Tokens 0-95 get stored as n + 160 * Tokens 128-145 get stored as n - 114 * Tokens 96-127 get stored as n See the deep dive on "Printing text tokens" for details on how recursive tokens are stored in the recursive token table.
MACRO RTOK n IF n >= 0 AND n <= 95 t = n + 160 ELIF n >= 128 t = n - 114 ELSE t = n ENDIF EQUB t EOR 35 ENDMACRO