![]() |
Integer?
How do you make a certain value an integer?
|
NPC Code:if (int(5.5) == 5) message w00t!; ... ? |
More like this:
NPC Code: I found it out, thx to Giltwist NPC Code: |
Pft, that is what I said, but, still...
Quote:
NPC Code: Untrue. |
Quote:
|
you meant this ?
NPC Code: etc.. |
No, i meant
this.i=64.03048487529532 int(this.i); And the solution would be 64... But that didn't work, i must do this.i=64.03048487529532 this.j=int(this.i); |
Yeah graal functions dont assign values by reference.
e.g. In VB: Private Sub Form_Load() Dim x as integer funcByValue x MsgBox x End Sub Function funcByValue(ByVal x As Integer) x = 10 End Function At the end of this program, it would msgbox 0 Private Sub Form_Load() Dim x as integer funcByReference x MsgBox x End Sub Function funcByReference(ByRef x As Integer) x = 10 End Function At the end of this program, it would msgbox 10. Graal functions have parameters and return the values of what the functions return through the function, not the parameters. therefore this.i=64.3125325123551235; int(this.i); //this.i==64.3125325123551235 but this.i=64.3125325123551235; this.i=int(this.i); //this.i==64 At this point i have hopefully confused the hell out of anyone and if not, bluegh :P :D |
In nearly every programming language you must assign a value to a certaintype :o
|
Quote:
|
I thought the you was C--
|
Quote:
|
Quote:
You just used different letters O_o .. |
Quote:
Coding in C++ I mean. |
All times are GMT +2. The time now is 12:07 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.