Script - true and false values In the Script, when one is checking whether a value is true of false, should the length of the expression be checked? For example, 0x01 is evaluated as true, but can the same be said  about 0x0001, 0x000001, etc?
Anything that doesn't encode a form of zero is considered to be true. Here's the code Bitcoin uses:

bool CastToBool(const valtype&amp; vch)
{
    for (int i = 0; i &lt; vch.size(); i++)
    {
        if (vch[i] != 0)
        {
            // Can be negative zero
            if (i == vch.size()-1 &amp;&amp; vch[i] == 0x80)
                return false;
            return true;
        }
    }
    return false;
}