> 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 th
Hi Chip,
That brings up a good question. A “static” variable doesn’t seem very much
different from a constant on the surface. 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, wh
unless and/or until 4D gives us this ability:
- IP vars define at startup - do not change
On Mon, 5 Jun 2017 10:26:25 -0600, Cannon Smith via 4D_Tech wrote:
>> Define(Theme;Label;Value) // Value can be Long, String, Real, or Boolean
>
> BTW, one nice thing about creating constants directly in cod
> Define(Theme;Label;Value) // Value can be Long, String, Real, or Boolean
BTW, one nice thing about creating constants directly in code, if we had a 4D
command to do it, is that it would be easier to give away code. For example,
I’ve started to use constants extensively in the last year or two,
Not when you have a bunch of Find In Design windows open, several deeply nested
Explorer folders expanded, and several non-developer related windows in some
state that takes time to reproduce. Relaunching 4D then is a hassle.
--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403
On Mon, Jun 5, 2017 at 8:43 PM, Peter Bozek via 4D_Tech <
4d_tech@lists.4d.com> wrote:
> On Mon, Jun 5, 2017 at 11:15 AM, David Adams via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
Thanks for chiming in! I don't in any way mean that 4D should limit itself
to the features and construct of a langua
On Mon, Jun 5, 2017 at 11:15 AM, David Adams via 4D_Tech <
4d_tech@lists.4d.com> wrote:
> In order of complexity:
>
I would add my favorite two:
* return statement - yes, Pascal does not have a return statement, but it
is so useful and need so little effort to implement that having 'clean'
Pascal
On Mon, Jun 5, 2017 at 6:08 PM, Jeremy Roussak via 4D_Tech <
4d_tech@lists.4d.com> wrote:
> I’ve missed enumerated types and structs very much, just as I’ve missed
such
> things as pre- and post-increment and decrement, the ?: construct ...
The language is in desperate need of improvement. I hav
David,
I’ve missed enumerated types and structs very much, just as I’ve missed such
things as pre- and post-increment and decrement, the ?: construct (now
addressed by Choose, admittedly), the lack of any true ability to break out of
a loop and some of the more interesting and creative uses of
On Mon, Jun 5, 2017 at 4:28 AM, Jim Dorrance via 4D_Tech <
4d_tech@lists.4d.com> wrote:
> Constants are meant to be used. If you do not re-initialise everything,
> you might have code built with previous constant values.
In my feature request, I put this down as definitely an 'at your own risk'
f
> On Sun, Jun 4, 2017 at 2:40 PM, Kirk Brooks via 4D_Tech <
The reload thing is a deal on apps with an extensive startup process.
> Constants are meant to be used. If you do not re-initialise everything,
> you might have code built with previous constant values.
>
>
>
> --
Jim Dorrance
jim.dorr
Kirk,
I've been growing my constants list exponentially for this very reason.
Since object attributes are case sensitive, the opportunity for maddening
bugs is high. Attribute name constants eliminate this. I group them with a
prefix for easy typeahead and code clarity ("PREF Save error to log att
David,
On Sat, Jun 3, 2017 at 11:40 PM, David Adams via 4D_Tech <
4d_tech@lists.4d.com> wrote:
> On Sun, Jun 4, 2017 at 2:40 PM, Kirk Brooks via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> > You know what else would be good is if constants weren't stored in
> > Resources but in a separate Constant
> Le 4 juin 2017 à 12:04, Jim Dorrance via 4D_Tech <4d_tech@lists.4d.com> a
> écrit :
>
> Re-loading constants. Run Menu, Restart Interpreted: Alt Command I.
>
> Faster than finding a command and executing it.
Nice!
First time I realize its not only a toggle compiled/interpreted :-(
--
Arna
Re-loading constants. Run Menu, Restart Interpreted: Alt Command I.
Faster than finding a command and executing it.
--
Jim Dorrance
jim.dorra...@gmail.com
4...@dorrance.eu
www.4d.dorrance.eu
PS: If you know of anyone that needs an experienced 4D programmer to add
energy and experience to their t
> I have been a fan of custom constants since I started using 4D, probably
because
> my background in C meant that I couldn’t imagine a programming
environment which
> didn’t have them (whether as preprocessor directives or enumerations).
How have you coped with no enumerated types and no structs?
#define informational 1
#define warning 2
…
Hmm. I think I’ve seen that somewhere before.
Jeremy Roussak
j...@mac.com
> On 4 Jun 2017, at 06:40, David Adams via 4D_Tech <4d_tech@lists.4d.com> wrote:
>
>
> Define(Theme;Label;Value) // Value can be Long, String, Real, or Boolean
>
> Define("
David,
I have been a fan of custom constants since I started using 4D, probably
because my background in C meant that I couldn’t imagine a programming
environment which didn’t have them (whether as preprocessor directives or
enumerations).
I think some of your suggestions are wonderful. RELOAD
On Sun, Jun 4, 2017 at 2:40 PM, Kirk Brooks via 4D_Tech <
4d_tech@lists.4d.com> wrote:
> Since I've been using c-obj more and more for parameter passing and just
> general data handling in memory I've started using constants more than
> before for object keys exactly because of the need for keys
David,
On Sat, Jun 3, 2017 at 10:30 PM, David Adams via 4D_Tech <
4d_tech@lists.4d.com> wrote:
>
> * Constants for strings as they make @$%@#$%@#% stupid errors from typos a
> thing of the past, well, at least where they use them. This is super
> helpful when working with property names in C_OBJE
Forgot to say:
* Constants for numeric codes are great as they make the code a whole lot
easier to read:
$error_level:=5
Well that's good to know...I guess. Is that good or bad? With a custom
consant:
$error_level:=Error level is fatal
Oh, that makes more sense.
* Constants for strings as the
21 matches
Mail list logo