> The only differences I can think of are (1) a constant is compiled into the 
> raw binary
> and (2) because of that, a constant is the same across all instances of an 
> app, where
> a “static” variable can be computed at launch (or when it is created). It 
> just can’t change
> later on while the app is running.

These are way different in other languages. C++ for example

A 4D "constant" is more like a compiler definition "#define" where the compiler 
will substitute a name for a value
        #define MAX_ARRAY_SIZE 20
        // anywhere MAX_ARRAY_SIZE is in the code, the compiler will put in a 20

A constant in C++ is more like a variable that can't be modified, assigned once 
at declaration and then never changes while in scope. For example
        myMethod (const int myParam)
        const tint myParam = 7;

A Static is more of a shared variable for example a static variable in a class 
that is shared between instances of a classes with a single initialization, 
each instance of the class access have access to the same variable

Concepts get more involved when you have static classes :)

Neil




--

Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to