How to get Value of Function

Blitz3D Forums/Blitz3D Beginners Area/How to get Value of Function

xmlspy(Posted 2003) [#1]
.


GfK(Posted 2003) [#2]
result% = functionname(value1,value2)

function functionname(value1,value2) 
  Return value1/value2 
end function
Functions return an integer by default.

If your function is going to return a float, then put a '#' after 'functionname' in the function declaration. To return a string, use '$'.

In the example you used (dividing two numbers) you may find this more useful:
result# = functionname(value1,value2)

function functionname#(value1#,value2#) 
  Return value1/value2 
end function



xmlspy(Posted 2003) [#3]
.