Mintoris
Oct 20, 2017, 12:27 PM *
Welcome, Guest.

login

register

Did you miss your activation email?


Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Nestd Functions  (Read 42 times)
zakerytclarke
Sr. Member
****
Posts: 176



« on: Oct 12, 2017, 08:38 AM »

I think it would be really cool if functions had the ability to be nested. It would help prevent duplicate variable naming and would make it easier for people in the Mintoris community to package their code into libraries.
Example Syntax:

foo()
foo.bar()
rem calling the function outside foo
sub foo()
bar()
rem calling the function inside foo

sub bar()
print "The power of nested functions!"
end sub

end sub

This would work similarly to classes and methods in Java.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.025 seconds with 17 queries.