Re: Subroutines
Re: Subroutines
- Subject: Re: Subroutines
- From: "Randy Fingeroot" <email@hidden>
- Date: Mon, 08 Jan 2001 13:36:09 -0500
You can also pass variables to your handler:
set x to 5
set y to x+z
set theResult to subroutinename(x,y)
on subroutineName(x,y) -- or you can rename them for this routine,
subroutinename(a,b)
set aNumber to x+y
return aNumber
end subroutinename
--
Randy Fingeroot
Systems Editor
Tallahassee Democrat
(850) 599-2141
(850) 599-2295 (fax)
>
From: email@hidden
>
Date: Mon, 8 Jan 2001 11:51:44 -0500
>
To: email@hidden
>
Cc: email@hidden
>
Subject: Re: Subroutines
>
>
set result to SubRoutineName()
>
display dialog result
>
>
on SubRoutineName()
>
set x to 2
>
return 2
>
end SubRoutineName
>
>
-Steve
>
>
>
>
>
email@hidden on 01/08/2001 11:41:38 AM
>
>
To: email@hidden
>
cc:
>
Subject: Subroutines
>
>
>
>
Is there a way to do subroutines in applescript?
>
>
I saw an example that went something like this:
>
>
on SubRoutineName()
>
commands
>
end SubRoutineName
>
>
If that works, how do I call the subroutine?
>
>
Thanks,
>
--SGross
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users