Mintoris
Oct 20, 2017, 12:45 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: Is "Global" statement really necessary in variable declaration?  (Read 224 times)
FabianClub
Full Member
***
Posts: 46


« on: Jun 11, 2017, 08:57 AM »

I'm programming a game  that has many subroutines, and in these I use the main program variables.
For that reason, I had to precede all the variables of the Global command.
At this point, it looks like the mandatory command of the basic Spectrum "LET".
I think that general-purpose variables are more necessary in all subroutines, while local variables are less frequent.
I think it would be more useful if by default all variables are in general use (and do without the Global command) and only use a command in cases where a local usage variable is needed (eg "Local A=5")
Chuck, I'm just telling you my experience, you're the one who decides whether to serve the suggestions or not.
« Last Edit: Jun 12, 2017, 02:47 PM by FabianClub » Logged
Pages: [1]
  Print  
 
Jump to:  

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