Bonjour William,
Le 17 oct. 08 à 17:08, william humphrey a écrit :
2. why would anyone use the function thing when they can use a
command with
a parameter. What good is a function? I guess when you want multiple
parameters?
Functions are useful and handy because their main purpose is to
return a value:
set the enabled of group "Commands" to ThereIsAPilot() --
function ThereIsAPilot
return "William" is among the lines of CurrentUsers() --
-- returned value will be a Boolean (TrueOrFalse)
end ThereIsAPilot
function CurrentUsers
return fld "Users" of card "Reference"
-- returned value will be a list of lines
end CurrentUsers
Etc.
Consider this just to understand how it works.
Actually commands can return a value also (using the result... that
is actually a function :-) but it's less handy.
More generally, think about commands (on, command) when this will
lead to a result visible by the user in your GUI.
And think about functions to get values you need to achieve a process.
There would be hundred of pages to write about commands versus
functions: see the user guide p. 121 and after.
About F and H used in Rev 3.x script editor in lists, I assume that H
means 'handler' and could be considered as incorrect since a function
is a handler as commands are :-)
And, after having verified, Rev docs name commands handlers...
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/
----------------------------------------------------------------
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution