[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Uninitialized SCM variables
From: |
Carl Sorensen |
Subject: |
Re: Uninitialized SCM variables |
Date: |
Thu, 18 Aug 2011 08:11:41 -0600 |
On 8/17/11 11:32 PM, "Dan Eble" <address@hidden> wrote:
>
> Backing upS I believe the compiler will initialize the bits in the
> aforementioned variables to zero, but is zero a desirable default for SCM
> variables in general, and these in particular?
Yes. In this case, if we were to initialize it, it would be to zero, which
indicate that it has not been given a SCM value.
>
> It also just sank in that in another thread there was a statement that
> treating a SCM as a boolean is "very wrong". That would include a number of
> lines in ly_property_lookup_stats and note_property_access that use these
> variables.
The thing that is wrong is treating a SCM boolean as if it's a C boolean.
In this case, we're looking for a non-zero value of the SCM variable,
indicating that it has been set.
HTH,
Carl
- Uninitialized SCM variables, Dan Eble, 2011/08/17
- Re: Uninitialized SCM variables, Carl Sorensen, 2011/08/17
- Re: Uninitialized SCM variables, Reinhold Kainhofer, 2011/08/17
- Re: Uninitialized SCM variables, David Kastrup, 2011/08/17
- Re: Uninitialized SCM variables, Graham Percival, 2011/08/17
- Re: Uninitialized SCM variables, Phil Holmes, 2011/08/17
- Re: Uninitialized SCM variables, David Kastrup, 2011/08/17
- Re: Uninitialized SCM variables, Dan Eble, 2011/08/18
- Re: Uninitialized SCM variables, David Kastrup, 2011/08/18
- Re: Uninitialized SCM variables, Reinhold Kainhofer, 2011/08/18
- Re: Uninitialized SCM variables,
Carl Sorensen <=
- Re: Uninitialized SCM variables, David Kastrup, 2011/08/17
- Re: Uninitialized SCM variables, Graham Percival, 2011/08/17