Re: IDE and eu4
- Posted by jaygade Jul 12, 2009
- 1328 views
No, it's a library function. The key to this bug is that you have what is effectively the use of a forward type (int). It's declared somewhere as a global type, but that file isn't included by IDE_XPMmer.ew, which means that the interpreter cannot resolve it until the end of parsing.
The other key ingredient is that the parameter name is the same as some other routine. Here is a minimal example to display the bug:
procedure bar() end procedure procedure foo( int bar, int what ) end procedure type int( object i ) return integer( i ) end type
This has been entered as bug 2820451:
https://sourceforge.net/tracker/?func=detail&aid=2820451&group_id=182827&atid=902782
I seem to recall that Derek said he was going to be working with the IDE. Derek, have you done much with it? I looked at the sourceforge project page, and it doesn't show a svn repository, and the cvs repository is empty.
Matt
Matt:
A Euphoria integer is in the range -1073741824 to +1073741823
A "C" type int is in the range -32,768 to +32,767
So isn't the type check wrong and not working properly.
Wait a C int hasn't been -32,768 - +32,767 for a long time, at least since the advent of common 32-bit systems. At least 10-15 years now...
For most non-DOS systems, a C int is -2,147,483,648 to +2,147,483,647. Which includes most computer systems in current use.
Not that using legacy systems is a bad thing, mind you.