Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Global variables



On 3/8/07 at 1:28 PM, deivy petrescu <email@hidden> spake thusly:

>
>On Mar 8, 2007, at 11:02, Larry the O wrote:
>
>> OK, I must be misunderstanding something really basic here.

<snip>

>> makePretend code:

>
>This works as (you) expected:
>
<snip>

As does this -

--> Cut <--
global littleMess, bigMess, ohMiGod

set littleMess to {"one"}
set bigMess to "bigMess"
set ohMiGod to "toilet paper"

bumpAndGrind()
twistAndShout()
shakeAndBake()

on bumpAndGrind()
	display dialog item 1 of littleMess as string
	set littleMess to {"incontinent dog", "naughty cat"}
	display dialog item 1 of littleMess as string
end bumpAndGrind

on twistAndShout()
	display dialog bigMess
	if bigMess is "bigMess" then
		set bigMess to "Uncle Ben's Rice"
	end if
end twistAndShout

on shakeAndBake()
	display dialog ohMiGod
	display dialog bigMess
	if ohMiGod is "toilet paper" then
		set bigMess to "You don't want to know."
	else
		set littleMess to {"cleanup effort", "disaster recovery"}
	end if
	display dialog bigMess
end shakeAndBake
--> Cut <--

JBS
-- 
A truly wise man never plays leapfrog with a Unicorn.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: Global variables (From: deivy petrescu <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.