hex number question!
I write these script codes
uint8 test(uint8 s)
{
return s;
}
void main()
{
test(0X1); ( X is capital letter)
}
the Compiler of AS 2.10.0 will show the results:
[compiler] New 0.as (7) : Error : Expected ')' or ','
I think, maybe AngelScript Compiler just only recognise hex number with 0x prefix.
But, in C/C++, the prifix with 0x or 0X will be identified as Hex Number.
Is this a bug ? or just author's thought?
Thanks a lot.
Hmm, I've always used a lowercase x to define hexadecimal numbers. Why not go with that?
I always use 0x too. It never occurred to me to support 0X as well, but I guess that can be done.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
Just to let you know, hexadecimal constants with 0X is supported. In fact it already was, I had just forgotten about it.
I tried to reproduce the problem, but I'm not getting the compiler message that you're getting. Can you give me another example that reproduces the problem?
I tried to reproduce the problem, but I'm not getting the compiler message that you're getting. Can you give me another example that reproduces the problem?
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement