Variable names on the fly?
Variable names on the fly?
- Subject: Variable names on the fly?
- From: "as digestion" <email@hidden>
- Date: Mon, 15 Jan 2001 23:39:14 -0000
Hi:
Can someone kindly explain why this doesn't work? I thought I would
construct a property name on the fly in order to get the month number, but I
get an error. (Can't get...) But if I use a propList like {jug: "1"} and ask
for the jug of the propList I always get the correct value, a 1.
Perhaps it is not possible to construct variable names on the fly?
-----start
set theDate to (date string of (current date))
set theMonth to word 2 of theDate
display dialog (theMonth) -- "January"
set monthProps to {mJanuary:"1", mFebruary:"2", mMarch:"3", mApril:"4",
mMay:"5", mJune:"6", mJuly:"7", mAugust:"8", mSeptember:"9", mOctober:"10",
mNovember:"11", mDecember:"12"}
set mMonth to ("m" & theMonth)
display dialog (mMonth) -- "mJanuary"
set monthNum to mMonth of monthProps --ERROR
---------stop
Thanks for any help!
asd
_________________________________________________________________
Get your FREE download of MSN Explorer at
http://explorer.msn.com