Skip to Content.
Sympa Menu

sm-grimoire - [SM-Grimoire] Variable names always use {} - was - Please look at my chrony spell

sm-grimoire AT lists.ibiblio.org

Subject: Discussion of Spells and Grimoire items

List archive

Chronological Thread  
  • From: Mark Andrews <msasgl AT msa-enterprises.com>
  • To: "Sergey A. Lipnevich" <sergeyli AT pisem.net>
  • Cc: sm-grimoire AT lists.ibiblio.org
  • Subject: [SM-Grimoire] Variable names always use {} - was - Please look at my chrony spell
  • Date: Fri, 20 Dec 2002 09:56:07 +0000

Hi Sergey,

Friday, December 20, 2002, 5:27:37 AM, you wrote:

>>2) Include { and } around your variables i.e.: ${SPELL}-${VERSION}.tar.gz
>>--
>>probably the cure to your frustration
>>
SAL> I disagree. {} is used for complicated operations. Why use it for simple
SAL> ones, like getting a value of a variable?

To save Eric having to explain about this again, it's for a number of
reasons:

1) It helps newbies by showing variables more clearly.
2) It helps prevent bugs such as $SPELL-$VERSIONb.tar.gz
3) It helps readability and consistancy of the code.

There might be more, but it's a while since this was covered on the
lists and I can't remember the full details, and despite knowing it's
there I can't find the original thread in my archives. <shrug> It's
probably not under an obvious thread - as like this time it was
brought up as a sub topic.

Thanks to your heads up about checking subjects though, I fixed it on
this one so it stands a chance of being found in future ;-)

--
Best regards,
Mark mailto:msasgl AT msa-enterprises.com





Archive powered by MHonArc 2.6.24.

Top of Page