× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Mon, Apr 25, 2022 at 4:19 PM Javier Sanchez
<javiersanchezbarquero@xxxxxxxxx> wrote:

Uninitialized variables always bear garbage.

On Tue, Apr 26, 2022 at 8:39 AM Niels Liisberg <nli@xxxxxxxxxxxxxxxxx> wrote:

Variables are always NULL when not initialised. So you see the 0 in the
debugger but it is actually NULL and your "IF" is unpredictable;

Does anyone know if the debugger *always* shows 0 for
uninitialized/null numeric values? (And I guess empty string for
character values.) Or does it just dump what's in memory, interpreted
as the declared type?

I suspect the latter, given that it probably simplifies the debugger logic.

I guess it is also *helpful* to get a straight memory dump, given that
such information could be what the programmer is looking for while
debugging[1].

Does the debugger show (or is there a setting which tells it to show)
the null indicator for each variable?

If not, that would be a great enhancement.

John Y.


[1] I suppose some would say that a programmer should *always* be
interested in the contents of memory. I would argue that, in 2022,
most of the computing world has long since come around to the idea
that only people who write operating systems, programming languages,
device drivers, and the like should have to care about that. Most
programmers would be far more productive working at a higher level of
abstraction. Indeed, SQL was designed with that in mind, and that's
what Rob was trying to debug. If the debugger had clearly indicated
that the value was NULL, he would have found and fixed the problem in
less time than it took for him to write the email describing the
situation to us.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.