Thread: Integer?
View Single Post
  #8  
Old 01-05-2004, 10:11 PM
Hevaricubed Hevaricubed is offline
Registered User
Join Date: Aug 2003
Posts: 262
Hevaricubed is on a distinguished road
Send a message via AIM to Hevaricubed Send a message via Yahoo to Hevaricubed
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

__________________
Reply With Quote