Sign in to follow this  
paphi

Feature Request about floating constants

Recommended Posts

paphi    100
Hello! Thanks for this great library. But I have some request.

1. I want to use floating constant in script as my original type directly.
For example, "0.1" in script can be regarded as of my type, such as fixed-point number, not float or double.

I now use my special type "dec", fixed-point number, storeing 2^16times of original value to the primitive type "int".
Flags are asOBJ_VALUE | asOBJ_POD | asOBJ_APP_PRIMITIVE.
When register my function "func(dec, ...)", "func(double, ...)" is needed for convenience.
It is verbose, so I want not to do so.

Is it possible that embedded constants in binary code is of original type?
In other words, converting string to original type is done while Build().


2. I want to use hexadecimal floating constants in script, which is seen in C99 feature, etc.

I hope hex float could be also regarded as my own type.


Thank you. I wish you understand me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this