These bugs do plan to be resolved, when they can be.
Moderator: GZDoom Developers
by ZippeyKeys12 » Sat Nov 11, 2017 10:57 pm
- Code: Select all • Expand view
const x="12";
int y=x.ToInt();
console.printf("%d",y);
Prints 0
- Code: Select all • Expand view
int y="12".ToInt();
console.printf("%d",y);
Prints 0
But...
- Code: Select all • Expand view
String x="12";
int y=x.ToInt();
console.printf("%d",y);
Prints 12
I don't think this is intended, and while running ToInt() on a literal is pointless, some may want to run it on a constant.
EDIT: Also happens with ToDouble()
-
ZippeyKeys12
-
- Joined: 15 Jun 2016
by Graf Zahl » Sun Jan 21, 2018 10:11 am
The compiler really accepts this? I am not surprised that it fails. To call a function you need to take the address of a variable. For a constant that's not possible at the moment.
-

Graf Zahl
- Lead GZDoom+Raze Developer

-
- Joined: 19 Jul 2003
- Location: Germany
by Graf Zahl » Sun Jun 03, 2018 11:33 am
Moved to "on hold" because I really do not have any good idea how to deal with this.
-

Graf Zahl
- Lead GZDoom+Raze Developer

-
- Joined: 19 Jul 2003
- Location: Germany
Return to On Hold Bugs
Who is online
Users browsing this forum: No registered users and 0 guests