Anonymous enums

Started by
1 comment, last by InvalidPointer 12 years, 4 months ago
Is it possible (or planned in your TODO list) to enable unnamed enums declarations in the AS scripts?

Thanks in advance :).

Regards
virious
Advertisement
I hadn't really thought of it before now. Currently it is not possible, it would require code changes.

Why do you feel anonymous enums would be needed? What would the advantage be?

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

In C++-land, I consider them a useful alternative to integer macro constants, so long as you have the ability to manually specify the 'backing' type. (like you can do with some MSVC language extensions and as a part of the new C++11 standard) This has the advantage that you fundamentally can't do weird things like &MAX_ARRAY_SIZE, etc. but this isn't actually an issue in Angelscript.

Actually, strongly-typed enums could be an interesting feature in of themseves.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

This topic is closed to new replies.

Advertisement