The PSION Organiser II Homepage
Forum Home Forum Home Help Help Search Search Members Members Login Login Register Register

Welcome, Guest. Please Login or Register.
Why register?
   The Psion Organiser II Forum
   User Forum
   User Post
(Moderator: Mikesan)
   A Windows Text Editor For OPL
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: A Windows Text Editor For OPL  (Read 783 times)
Mikesan
Administrator




   
WWW

Posts: 211
A Windows Text Editor For OPL
« on: Jul 5th, 2014, 2:55pm »
Quote Quote Modify Modify

Today, I adjusted the OPL syntax highlighting I created in a Windows text editor called TextPad to make it highlight the syntax in OPL.  This is not an advert for TextPad (from Helios Software) and I don't earn any sort of commission, but I have been using this application for years (I still use v4.5) and I actually now only use a Word Processor to format text in - it is almost always produced in TextPad.
 
The REM statements now almost disappear as light grey text using this definition.  Numbers are much darker grey, but separate themselves from anything else.  Keywords are bold and blue.  Operators and punctuation are a solid green, while brackets are red.  Strings are a sort of softer green that stands separate from anything else quite well too.
 
What we now have is code that leaps out at you - unfettered by the myriad comments that I still like to add.  You can still read them, but now you have to want to...  Awkward things like including, or otherwise, a comma, or semicolon can no longer get away with it and angle brackets can no longer hide beside brackets as they are usually want to do, just when you least expect it
 
Yes, it looks 'brash' but we aren't using syntax highlighting to win a fashion contest, we are trying to make sure that we don't try and run code that was inaccurately typed in!
 
I have also included all the SIBO (Series 3, Siena, HC, Workabout) commands, etc, so unfortunately these could catch the unwary Organiser II programmer unawares, if they are prone to a bit of SIBO on the side...
OPLSNTX.ZIP 2.2 kb
Mikesan
Administrator




   
WWW

Posts: 211
Re: A Windows Text Editor For OPL
« Reply #1 on: Jul 17th, 2017, 4:30pm »
Quote Quote Modify Modify

Since posting the first version of this syntax definition, I went on to write more code with it.
One of the changes that I made is that by using a colon ":REM" as opposed to "REM" you get the light grey, while without produces green.  This suited me in my SIBO stuff, but it shows one method of how you can automate your highlighting.
 
Anyway, this is the one that I use now.
OPLSNTX2.zip 1.8 kb
MartinReid
Power Member




   
WWW

Posts: 57
Re: A Windows Text Editor For OPL
« Reply #2 on: Jul 18th, 2017, 9:26am »
Quote Quote Modify Modify

Dear Mike
 
I had a look at TextPad by Helios Software Solutions. Imagine my surprise when I noticed the Post Code is just round the corner from mine! Small world!
 
Also they have a copy of 'OPL' in their Syntax Definitions.
 
"OPL Syntax definitions for Psion's OPL language as implemented on the series-3 machines. OPL.syn is the syntax file common to all members (3, 3a, 3c, 3mx) of the family. Contributed by Peter Overfield, 10 May 2000"
 
Anyway keep up the good work
Martin
Mikesan
Administrator




   
WWW

Posts: 211
Re: A Windows Text Editor For OPL
« Reply #3 on: Aug 14th, 2017, 11:20am »
Quote Quote Modify Modify

Wow, I didn't know that! Still, it meant that I had to learn how to do it and I now have my code looking the way that I want it to - colours, etc, but thanks for the heads-up.
« Last Edit: Aug 14th, 2017, 11:20am by Mikesan »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

The Psion Organiser II Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB 2000-2002,
Xnull. All Rights Reserved.
top