[FR] [EN]Re: Getting the type code of a file under OSX

Dom mcdomi at free.fr
Sat Jul 30 13:03:37 EDT 2005


Eric Chatonet <eric.chatonet at sosmartsoftware.com> wrote:

> Quand les variables sont déclarées en tête du script, leurs valeurs  
> sont alors accessibles par toutes les procédures du script.
> When variables are declared outside the handlers their values are  
> available to all handlers in the script.

OK
(it's gone bilingual ;-))
 
> Quand elles sont déclarées à l'intérieur d'une procédure, leur valeur
> n'existe que pour la procédure considérée.
> When they are declared inside a handler, their values are only  
> available for this handler.

OK!

When I have a complex script with calls to another "procédures", it is
therefore better to explicitly declare the variables used by the main
script and its "procédures" (the handlers, commands and fucntions)
called by this main handler (hard to speak of, not confusing between
"script" = all the handlers in a control, and the handlers composing the
script)

By the way, I made the choice of "explicit variables"...
Nonetheless, Rev allows to use implicit variables shared by handlers
among a given script -- but better to declare them as locals?
I remember that in HC you had to resort on globals in this case...
You ended a session with a number of globals you didnt' remember of ;-)




More information about the use-livecode mailing list