Click here to Skip to main content

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrasing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Val Grind (the wrong kind) PinmemberBrady Kelly2-Jan-13 21:46 
GeneralRe: Val Grind (the wrong kind) PinmemberNagy Vilmos2-Jan-13 22:52 
GeneralRe: Val Grind (the wrong kind) PinmemberLesF4-Jan-13 9:51 
GeneralRe: Val Grind (the wrong kind) PinmemberRob Grainger4-Jan-13 10:09 
GeneralRe: Val Grind (the wrong kind) PinmemberNaerling4-Jan-13 11:56 
GeneralRe: Val Grind (the wrong kind) PinmemberMember 46088986-Jan-13 11:45 
GeneralRe: Val Grind (the wrong kind) PinmemberNaerling6-Jan-13 12:26 
GeneralRe: Val Grind (the wrong kind) PinmemberChris Quinn24-Dec-12 0:19 
That is a programmer's trick to handle null values - it converts a null value to an empty string, which then evaluates to zero. The use of the ampersand (&) makes this work - if the plus sign (+) is used to concatenate, an invalid use of null error will be thrown, as any variable concatenated using + will be nulled if any of the concatenated values are null
 
It is equivalent to using functions such as IsNull, NZ etc
====================================
Transvestites - Roberts in Disguise!
====================================

GeneralRe: Val Grind (the wrong kind) PinmemberRob Grainger29-Dec-12 3:19 
GeneralRe: Val Grind (the wrong kind) PinmemberChris Quinn31-Dec-12 0:17 
GeneralRe: Val Grind (the wrong kind) PinmemberRob Grainger31-Dec-12 2:57 
AnswerRe: Val Grind (the wrong kind) PinmemberMark Hurd3-Jan-13 14:32 
GeneralRe: Val Grind (the wrong kind) [modified] PinmemberRob Grainger4-Jan-13 9:55 
GeneralRe: Val Grind (the wrong kind) PinmemberMark Hurd4-Jan-13 14:56 
GeneralRe: Val Grind (the wrong kind) Pinmemberplaystation328-Dec-12 21:22 
JokeRe: Val Grind (the wrong kind) PinmemberRafagaX3-Jan-13 4:57 
GeneralRe: Val Grind (the wrong kind) Pinmemberdshillito3-Jan-13 10:58 
GeneralRe: Val Grind (the wrong kind) [modified] PinmemberRob Grainger4-Jan-13 9:56 
GeneralRe: Val Grind (the wrong kind) Pinmembercpkilekofp11-Jan-13 7:02 
GeneralRe: Val Grind (the wrong kind) PinmemberRob Grainger11-Jan-13 7:42 
GeneralI am the Legend of Grimrock Poster PinmemberRob Grainger17-Dec-12 11:35 
GeneralRe: I am the Legend of Grimrock Poster PinmemberZac Greve17-Dec-12 17:25 
JokeRe: I am the Legend of Grimrock Poster PinmemberMember 829282421-Jan-13 3:01 
GeneralIt does what now? PinmemberMember 869907216-Dec-12 8:23 
GeneralRe: It does what now? PinmemberZac Greve16-Dec-12 9:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 17 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid