|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Thursday, May 02, 2013 3:45 PM
Points: 3,748,
Visits: 928
|
|
Excellent question, Tom, and even better explanation.
"El" Jerry.
"A watt of Ottawa" - Gerardo Galvan
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Yesterday @ 2:20 PM
Points: 3,462,
Visits: 2,539
|
|
| Nice question - thanks, Tom!
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: 2 days ago @ 6:12 AM
Points: 2,526,
Visits: 3,620
|
|
Thanks for the question!
Best Regards,
Chris Büttner
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 8:26 AM
Points: 6,737,
Visits: 11,791
|
|
Rob Schripsema (2/5/2013) Great question, Tom
I almost wish you had thrown in an option of '2012-04-01 10:00:00.000' to spice up the thinking a bit more. Of course, then I probably would have gotten it wrong....
+1 to that
Nice question.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Thursday, May 02, 2013 3:04 AM
Points: 31,
Visits: 33
|
|
| Wow, my first really wrong answer. I knew about CASE's type inferral, just forgot. Thanks for the exceptionally good question.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: 2 days ago @ 2:06 PM
Points: 1,689,
Visits: 656
|
|
| I got caught by the Null. I work as a Programmer more often than not where some Languages automatically initialise a Variable at declaration time. The ones that don't tend to just leave the Variable with whatever is in its memory location. I would prefer Null as a default in these instances rather than garbage.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 8:26 AM
Points: 6,737,
Visits: 11,791
|
|
David Conn (3/6/2013) The ones that don't tend to just leave the Variable with whatever is in its memory location. Yikes, not sure I know (or knew or remember) which might do that. To which were you referring?
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: 2 days ago @ 2:06 PM
Points: 1,689,
Visits: 656
|
|
C. This was my first encounter with uninitialised variables.
When I declare an Integer for example I expect its value to be 0.
At least in T-SQL we can now give a Value on the Declare statement.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 8:26 AM
Points: 6,737,
Visits: 11,791
|
|
David Conn (3/6/2013) C. This was my first encounter with uninitialised variables. Thanks. I am pretty sure that aspect of C "fell off my memory queue" a long time ago 
At least in T-SQL we can now give a Value on the Declare statement. I like that too. We didn't have to worry about garbage in an uninitialized variable but that piece always seemed like one of the more obvious gaps in the language. Now that it is there the language feels that much more fluid and aligned with most of the other languages I work with, which is nice.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|