Current News

Moderator: Mmiscool

User avatar
By Electroguard
#45859 The fact that 'duck' quotes are read as text whereas 'turkey' quotes are interpreted by the parser does raise an interesting possibility when you think about it!

Perhaps it might deliberately be used for inserting serial run-time commands into the parsed script to instruct it to do additional things not listed in the actual script. I know it's possible to 'chain' in new chunks from a file, but this might offer real-time serial commands on the fly if ever that was needed.

It might even offer a way of of having macro commands, whereby instead of needing to select from a list of pre-defined alternatives, eg:
if cmd = 1 then gosub [command1]
if cmd = 2 then gosub [command2]
if cmd = 99 then gosub [command99]

...perhaps a value could be inserted by macro, simplifying things to...
gosub [command & {turkey_quote} cmd ]

Obviously the 'turkey' quotes could be changed to something different and more suited as a 'macro' insertion character (^ or ~ or @ or # etc), and perhaps the macro input might be terminated by a matching macro end char, maybe resulting in something like...
gosub [command & ^99^ ]

It even ought to be a fairly simple matter to allow user-defined macro characters to be used if wished, ie: let macro = "^" to change it from any turkey default.

Just an intriguing thought.