Local Variables (New Features)

by Jim ⌂ @, Russell, KY, Monday, October 29, 2012, 21:56 (1608 days ago) @ M Santos

Manuel,

Variables INSIDE functions and subroutines are local (except the function name inside a function). This was how they were introduced in 0.9.9.x.

a = 10
b = 99
print "in main program"
print "a = " + a
print "b = " + b
call testsub(a)
print "back in main program"
print "a = " + a
print "b = " + b
end

subroutine testsub(a)
print "in testsub"
a = a * 2
b = 77
print "a = " + a
print "b = " + b
end subroutine

Is this what you were asking for?

JIm


Complete thread:

 RSS Feed of thread

powered by my little forum