Jump to content
  • Advertisement
Sign in to follow this  
WitchLord

AngelScript 2.26.2

This topic is 1932 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

It appears that character literals are now treated as signed (most likely per rev 1600), but scriptstdstring addon's index operators still use uint8. This forces a rather awkward syntax needed for working with literals of high ASCII codes without getting any warnings:

somestring[5] == uint8('?');

I think character literals should stay unsigned, but in any case their sign should match that of the addon.

Share this post


Link to post
Share on other sites

Actually, character literals are still unsigned. This was not changed when I changed integer numbers to be signed.

 

What settings do you have for the following engine properties?

 

asEP_SCRIPT_SCANNER

asEP_USE_CHARACTER_LITERALS

asEP_STRING_ENCODING

 

What is the compiler warning you get? And for what expression do you get them?

Share this post


Link to post
Share on other sites

Indeed they are. I just realized that it is our preprocessor that converts the character literals into integers, as a normal step of preprocessing. We don't even have asEP_USE_CHARACTER_LITERALS enabled. Another false alarm!

Edited by TheAtom

Share this post


Link to post
Share on other sites

Ah, you edited the message :)

 

So, your pre-processor is the one that treats the character literals as signed chars? Is this a home grown pre-processor?

Edited by Andreas Jonsson

Share this post


Link to post
Share on other sites

It is an improved version of the good old preprocessor by Anthony Casteel (also known as Deyja), from sources dating back to 2005 or so. I was going to mention it in relation to the other topic: http://www.gamedev.net/topic/640629-cc-like-define-directive-patch-attached/

 

It is built over version 0.5 of that preprocessor. I couldn't find any newer version (if it ever existed), in fact I can't seem to find the original sources whatsoever, anywhere. In addition to the features from 0.5, our version includes:

- multiline macros,

- recursive macro expansion,

- token concatenation with ## operator,

- evaluation of constant expressions (somewhat incomplete),

- additional features for #pragmas,

- minor things such as #warning and #error,

- incidentally, character literals are now converted to unsigned integers.

 

It is still independent from AngelScritpt and is platform-agnostic, and features a working line number translation between sources and the preprocessed file. And it is still pretty lightweight.

 

I have hopes to release (or should I say re-release) it soon, although that's not entirely up to me. And following that, discuss a possibility of including it in AngelScript sdk in some way (probably as an addon).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!