Raised This Month: $158 Target: $400
 39% 

Regarding certain statements and such.


Post New Thread Reply   
 
Thread Tools Display Modes
blaacky
Senior Member
Join Date: Oct 2012
Old 11-20-2016 , 20:42   Re: Regarding certain statements and such.
Reply With Quote #11

And /=, *= ^=, &=, |=, <<=, >>=, %=

Last edited by blaacky; 11-20-2016 at 20:45.
blaacky is offline
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-21-2016 , 05:21   Re: Regarding certain statements and such.
Reply With Quote #12

SourcePawn should have (AMXX Pawn does) >>> and >>>= operators too. Can't test right now, I'm on phone.

EDIT:
Just tested it, works.

Last edited by KliPPy; 11-21-2016 at 07:14.
KliPPy is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 11-21-2016 , 17:12   Re: Regarding certain statements and such.
Reply With Quote #13

Quote:
Originally Posted by KliPPy View Post
SourcePawn should have (AMXX Pawn does) >>> and >>>= operators too. Can't test right now, I'm on phone.

EDIT:
Just tested it, works.
What about <<< and <<<= ?

EDIT: Oh I missed the Wikipedia link at the bottom of page 1. Reading that right now.
__________________
Plugin Developer for cTF2w & Creators.TF


Last edited by 404UNF; 11-21-2016 at 17:16.
404UNF is offline
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-21-2016 , 17:31   Re: Regarding certain statements and such.
Reply With Quote #14

There is no left arithmetic shift.
KliPPy is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 11-21-2016 , 17:49   Re: Regarding certain statements and such.
Reply With Quote #15

Quote:
Originally Posted by KliPPy View Post
There is no left arithmetic shift.
Which makes sense if you know what right arithmetic shift does.

i.e. it makes the number keep the same sign in a Two's Complement number system, which is what Pawn, C, C++, Java, etc... use.

However, that doesn't work in the other direction.
__________________
Am I back? Well, we'll see.

Last edited by Powerlord; 11-21-2016 at 18:01.
Powerlord is offline
BAILOPAN
Join Date: Jan 2004
Old 11-22-2016 , 00:21   Re: Regarding certain statements and such.
Reply With Quote #16

The canonical list of reserved words is here: https://github.com/alliedmodders/sou.../sc2.cpp#L1858

Not all of them have actual semantics though. Some are just reserved.
__________________
egg
BAILOPAN is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 11-22-2016 , 00:22   Re: Regarding certain statements and such.
Reply With Quote #17

Wonderful, I've bookmarked that and will take a look in the morning. Thank you, all
__________________
Plugin Developer for cTF2w & Creators.TF

404UNF is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 11-27-2016 , 14:50   Re: Regarding certain statements and such.
Reply With Quote #18

So I need some help from you more experienced guys in figuring out where to place these remaining items:

PHP Code:
assert  *begin  builtin  cellsof  defined  *end  exit  __nullable__  object  sleep  tagof  *then  -integervalue-  -rationalvalue-  -identifier-  -label-  -string
By the way, regarding "-string-", while looking at sc2.cpp, I noticed that somehow there's two entries of "-string-" at the end of line 1950. Is this intentional or accidental?

Anywho, back to the list. Here's the current highlighting setup I've got, so you have an idea of how I've organized things for my highlighting. I'm just not sure where to put all those items I listed above.

loadsatext and colors in here


Picture of a plugin using my highlighting. I'm still making tweaks!

^(RE: the picture) I'm not sure if it's even possible in Notepad++ but I'd love to be able to have the first chunk of text after "#define" get colored purple (i.e #define PLUGIN_VERSION 1.0) but only the first chunk of text after the first space. Anything after a second space (the value of the define) shouldn't be affected. It'd also be great to have the same system in place for whenever someone creates a methodmap or enum, so the name of the methodmap/enum gets highlighted, and then any usage of that methodmap/enum's name in the plugin file should also get highlighted automatically. Again, not sure if that's even possible (doubt it) so I'm not even gonna bother trying it.
__________________
Plugin Developer for cTF2w & Creators.TF


Last edited by 404UNF; 11-27-2016 at 15:06.
404UNF is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:51.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode