PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Paul Squires on April 02, 2011, 04:31:19 PM

Title: Code syntax highlight for FireFly and PB10
Post by: Paul Squires on April 02, 2011, 04:31:19 PM
Please try the attached syntax highlighting file for use with PB10. If anything is missing then please let me know and I will update it.

Copy it to you \keywords folder of your FireFly installation.


Title: Re: Code syntax highlight for FireFly and PB10
Post by: Jim Dunn on April 02, 2011, 06:28:44 PM
(this might be a bad question...)

But... is it possible to have a PowerBasic9.txt, and rename this to PowerBasic10.txt in the Keywords folder???

Or, maybe I just need to take the plunge and use the PB10 I bought...

(I guess I'm gun-shy after reading all the problems they're finding on the PB forums)
Title: Re: Code syntax highlight for FireFly and PB10
Post by: Paul Squires on April 02, 2011, 07:22:50 PM
Hey Jim - I haven't used PB10 much either. Not at all with FF3. On Friday, I created some code to test PB's new collections stuff for use with objects. Seems to work well and is intuitive and pretty fast.

Other than that, I am waiting until others take the plunge and discover any problems first.

Title: Re: Code syntax highlight for FireFly and PB10
Post by: Ian Vincent on April 03, 2011, 01:17:13 AM
Paul,
    I could be doing something wrong, but

Canvas, wide, clipdata, dd,db, dw and dq

all seem to be reserved words now, and not highlighted with the new file.

FWIW, a small thing that I noticed last night - HEX$ behaves differently in PB9 Vs PB10.
It now works on Quads instead of Longs, so will return a bunch of 'F's in front of a negative number.
Easy enough to get around with Right$
Title: Re: Code syntax highlight for FireFly and PB10
Post by: José Roca on April 03, 2011, 01:47:51 AM
Clipdata?

Quote
Easy enough to get around with Right$

Even easier using HEX$(<value>, 8)
Title: Re: Code syntax highlight for FireFly and PB10
Post by: Paul Squires on April 03, 2011, 08:22:20 AM
Thanks Ian, if you notice anymore then please let me know.
I have updated the original post.
Title: Re: Code syntax highlight for FireFly and PB10
Post by: Ian Vincent on April 03, 2011, 12:16:20 PM
Re Reply #4 - from Jose:

Yes, indeed clipdata, see attached.

It is a structure in WTypes.inc, so not strictly a reserved word in PB, but as it is
included through Win32API.inc it will be an issue in Programs that use Win32API.inc

(another reason to use your includes of course!)

Title: Re: Code syntax highlight for FireFly and PB10
Post by: José Roca on April 03, 2011, 12:26:51 PM
CLIPDATA is also in my include files, but I was surprised that you wanted to add it as a keyword.

If you are going to add structure names, there are around 8000 in my include files :)
Title: Re: Code syntax highlight for FireFly and PB10
Post by: Paul Squires on April 03, 2011, 12:46:46 PM
Updated original post.

Added:
wString wField StringZ wStringZ

Removed:
ClipData
Title: Re: Code syntax highlight for FireFly and PB10
Post by: Ian Vincent on April 04, 2011, 12:35:38 AM
Jose, you are correct of course.
It's just that there are a lot of new things in and related to PB10  - things that just were not an issue until now.
It is still a little (or perhaps a lot) confusing to me.
Title: Re: Code syntax highlight for FireFly and PB10
Post by: José Roca on April 04, 2011, 12:57:27 AM
There are PBer's that want to add equates, structures, API functions and the names of his wife and children :)

With so many keywords, all the code will become blue :)
Title: Re: Code syntax highlight for FireFly and PB10
Post by: Haakon Birkeland on April 04, 2011, 05:14:49 AM
Quote...and the names of his wife and children
Then people have serious problems restraining "them"selves.

I guess my father could need that, if he where not to stupid to understand that a computer can be used for anything else than Facebook and porn. I have so many half-siblings that I don't even know their names. 8oÞ