Re: Addressing variables in subroutines
Re: Addressing variables in subroutines
- Subject: Re: Addressing variables in subroutines
- From: Emmanuel <email@hidden>
- Date: Fri, 21 Feb 2003 14:52:25 +0100
At 5:27 PM +0100 20/02/03, Jan Bruners wrote:
Hi all,
I am trying to write a script using a subroutine like this:
on zaehle(var1,var2)
tell application "FileMaker Pro"
show every record of database "scheine.fp5"
show (every record whose cell "ES_Note" is string1)
set string2 to count of records
end tell
end zaehle
zaehle(note1,sg1)
-- snip
The subroutine obviously uses the current value of the variables,
which is ok for var1. But var2 should be treated as the variable's
name (to modify the variable's value in the subroutine), not as
var2's value.
I already defined both vars as global.
Your example is not fully clear, since var1 and var2 don't seem to be
used by the handler.
Here is a sample which could be what you are looking for:
on ChangeTheGlobal() -- no parameter here
global var2
set var2 to pi
end
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.