Re: Syntax colours
Posted: Fri 13 Apr 2018, 12:48
You are underestimating the complication of syntax-highlighting BBC BASIC! Even something as simple as this is challenging for some highlighters:
Because there is no delimiter between PROC and sendmail many highlighters will fail to recognise the keyword. I have been spending the last few days struggling to make the GeSHi highlighter work (and I would probably have given up had I not known that Jon Ripley succeeded in the same challenge at the old wiki). Fortunately, as I have reported elsewhere, I have succeeded.
I'd also want to point out that in any case we don't have a choice in what syntax highlighter to use; GeSHi is the only one that the wiki (both old and new) supports.
As discussed, please use only CAPITAL keywords when listing code at the wiki or here at the forum. Lowercase keywords are non-standard in BBC BASIC and most variants of the language don't accept them.
Code: Select all
670 def procCopyToClipboard(text$) 690 sys "GlobalAlloc", &2000, len(text$)+1 to hdata%