Hi Lew

Message: 8
Date: Wed, 12 Jul 2006 09:27:27 -0400
From: "Lew Schwartz" <[EMAIL PROTECTED]>
Subject: Macros format/style in old code
To: [EMAIL PROTECTED]
Message-ID:
       <[EMAIL PROTECTED]>
Content-Type: text/plain;charset="us-ascii"

I'm cleaning up some old code and I keep coming across macros which are
uniformly coded with quotation marks and dots. Eg if a macro is stored
in a memvar, instead of seeing:

&memvar

The code consistently reads:

"&memvar."

All I can find out about this is that the programmer decided that using
the quotation marks and dot all the time avoided problems.

Anyone have any idea what problems are being addressed here, if any?


I regularly add the . to the end of a macro, just like I add a ) after
a (. It helps me see two dots are needed with commands like this...

lcObject = "test"
store "something" to &lcObject..SomeProperty

I've seen the "&memvar." format used when the memvar wasn't even an
expression. That's better done as

lcVar = memvar

With memvar containing an expression...

lcVar = "&memvar."

but it's almost always better to

lcVar = eval(memvar)

Note that both parentheses are mandatory ;)


_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to