• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Fun with coercing to string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fun with coercing to string


  • Subject: Fun with coercing to string
  • From: "Stephen Swift (aka Burnum)" <email@hidden>
  • Date: Tue, 20 Feb 2001 16:08:21 -0500

Mac OS 8.1
AppleScript 1.1.2

WHAT WORKS:
month of (current date) --> February

set ThisMonth to month of (current date)
display dialog ThisMonth
--displays a dialog box with the text 'feb'

set ThisDate to day of (current date)
display dialog "It is the " & ThisDate & "th of February."
--displays a dialog box with the text 'It is the 20th of February."

WHAT DOESN'T WORK:
set ThisMonth to month of (current date)
display dialog "We are in the month of " & ThisMonth
--Can't make February into a string

According to my AppleScript reference tables current date command is
coercible to a list of its properties. How come I can use the month in a
dialog box by itself but when I try to put it with another string
AppleScript tells me 'February can't be a string'? And How come it will
take the day of the current date and make it into a string? Thanks.

Stephen Swift ?' (The Burnum Man)
email@hidden
It9s Coming Back! AppleInfo.net - Check Back Soon
-----------------------------------------------
"Steve Jobs will use anybody to his own advantage. He will say one thing
and anybody who heard it would think that he was saying 'Maybe yes' or
'Maybe no.' You could never tell what he was thinking." -Steve Wozniak


  • Follow-Ups:
    • Re: Fun with coercing to string
      • From: Chris Nebel <email@hidden>
  • Prev by Date: Re: RFI
  • Next by Date: Re: Another ? about the new server...
  • Previous by thread: RE: Saving MS Word Pages as Docs
  • Next by thread: Re: Fun with coercing to string
  • Index(es):
    • Date
    • Thread