-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Hi, I try to write in functional rather than OO style code.
Is there any chance of Blitzmax getting Function 'Branch' visibility for its variables?
Visible to any sub-function called within the Function.
Similar to Fields in OO code, whereby the field has less visibility than a Global, but more visibility than a Local.
Global a:Int = 1
Function calculate(c:Int)
Local b:Int =2
Branch e:Int = 4
Print a+b+c+calc2()
End Function
Function calc2()
Return e+5
End Function
Print calculate(3)
results in
15
since e is visible in calc2.
currently when i want a 'Branch' variable in my Functional style code I either have to make it a Global, or pass it down thru function parameters.
thanks
Metadata
Metadata
Assignees
Labels
No labels