Advertisement

AngelScript 2.26.3 is out

Started by May 09, 2013 01:29 AM
5 comments, last by FDsagizi 11 years, 6 months ago

In this release I've implemented support for delegates, which is an extension of the previously available function handles. With delegates it is now possible to pass class methods as callbacks where an ordinary function handle is expected.

I've also finally taken the time to implement recursive search for symbols in parent namespaces. This should make the namespace feature much easier to use as you'll no longer have to prefix all the global symbols when compiling a function in a namespace.

The engine has a new property to allow an application to disable support for value assignments for reference types. While this may sound like a something bad, it is actually making the language less ambiguous when dealing with reference types. Too often do script writers make a value assignment when they actually intended to make a handle assignment.

The script builder add-on now also have methods to enumerate the script sections that were included in a module. This is an useful feature when caching the compiled bytecode, as you'll now know which files to check for updates in.

And finally I added a couple of add-on functions for doing a direct conversion from float to int, called fpToIEEE and fpFromIEEE. These are meant to be platform agnostic so they'll work even if the CPU where the script is running isn't using the IEEE standard natively to represent floating point values.

Regards,

Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Thanks, fantastic work. The asEP_DISALLOW_VALUE_ASSIGN_FOR_REF_TYPE is definitelly going to be set TRUE in my project

Advertisement

Great,thanks,I waited delegate for a long time,and I hope the @ symbol can be removed completely from the language as soon as possible,I was confused by it frequently...

i have small question, how use array sorting, with ref type ?

@glcolor:

I'm not sure I will remove it completely, but if I do it will only happen when I start working on AngelScript 3.0.

@FDsagizi:

You mean when you have something like:

array<obj@> arr;
arr.sort();

It's unfortunately currently not possible. Currently the CScriptArray will sort the handles by the address, rather than calling the opCmp method on the object, which is rather stupid. I don't know what I was thinking when I implemented it that way. But don't worry, I'll have it changed soon. cool.png

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I changed the array yesterday to allow it to sort on arrays of handles too. The code is in revision 1641.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement

Surep! allways - engine->SetEngineProperty( asEP_DISALLOW_VALUE_ASSIGN_FOR_REF_TYPE , true ); smile.png

by the way if asEP_DISALLOW_VALUE_ASSIGN_FOR_REF_TYPE == true then '@' not actual!

Thanks!

This topic is closed to new replies.

Advertisement