Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Functions as subroutines?
#1
It seems that in FB 0.13b a function returning an integer value can be called like a subroutine, i. e. ignoring the returned value:

Code:
function func(n as integer) as integer
  func = n * n
  print "done"
end function

func 2
This does not work if the returned value is not an integer type.
ean Debord
----------------
Math library for FreeBasic:
http://www.unilim.fr/pages_perso/jean.de...fbmath.zip
Reply
#2
It's a feature, it's in the readme since.. long ago..
Reply
#3
Since day one ;). Only for integer types.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)