Hi,
May be already exists and I'm putting a silly question....
I faced some problems in handling indipendent portions of program by taking care to the variables used, cleaning memory delete brushes, sprites etc.
I think could be very usefull to have statement like Function, but with the big difference that when exing from it all variables, graphics elemets etc used by this function are automatically deleted.
Sandro
Subpograms
Re: Subpograms
Hello Sandro,ilbarbax wrote:I think could be very usefull to have statement like Function, but with the big difference that when exing from it all variables, graphics elemets etc used by this function are automatically deleted.
Just declare your variables as Local inside the Function, otherwise Hollywood defaults to Global variables.
Local variable:
Code: Select all
Local x = 0
Code: Select all
x = 0