Functions in the on-rev - LC server script
mazzapaoloitaly at gmail.com
Tue Nov 16 12:17:00 EST 2010
Thank you Devin,
So, if I move all the functions and all the commands (transformed in
functions) of my script before the main command the script of my stack
should work also in the on-rev server.
I will give it a try.
Thanks a lot
On Tue, Nov 16, 2010 at 5:59 PM, Devin Asay <devin_asay at byu.edu> wrote:
> On Nov 16, 2010, at 9:40 AM, paolo mazza wrote:
> > How can I place a function in a on-rev - CGI server script ?
> > I have to port a stack script (with commands and functions) to a .irev
> > file for the on-rev server .
> > I expected something similar to the following script...
> > <?rev
> > put MyFunction() into tVAR1
> > put tVAR1
> > function MyFunction
> > put 1 + 1 into VAR2
> > return VAR2
> > end MyFunction
> > ?>
> > ... but obviously it does not work !!!
> > Any idea?
> In irev scripts you have to declare the function before you call it, so
> just put the function handler at the top:
> function MyFunction
> put 1 + 1 into VAR2
> return VAR2
> end MyFunction
> put MyFunction() into tVAR1
> put tVAR1
> Devin Asay
> Humanities Technology and Research Support Center
> Brigham Young University
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode