Click here to Skip to main content
15,907,913 members

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, embarrassing 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: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
John R. Shaw17-May-07 4:54
John R. Shaw17-May-07 4:54 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
ricecake22-May-07 4:05
ricecake22-May-07 4:05 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
Rob Grainger17-May-07 5:57
Rob Grainger17-May-07 5:57 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
ricecake22-May-07 4:01
ricecake22-May-07 4:01 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
John R. Shaw25-May-07 13:53
John R. Shaw25-May-07 13:53 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
John R. Shaw25-May-07 13:48
John R. Shaw25-May-07 13:48 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
Arun.Immanuel17-May-07 3:00
Arun.Immanuel17-May-07 3:00 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
John R. Shaw17-May-07 4:09
John R. Shaw17-May-07 4:09 
Actually no! Long pointers are not used any more and where used to overcome the limitations of PC memory access. The PC was limited to accessing only 64k, minus a few bytes for the systems use, so that was the max you could allocate with standard C (malloc). A normal pointer was only 16 bits, and a long pointer was a 32 bit pointer which required the compiler to generate code that allowed you to access more that 64k. Microsoft had the keyword ‘_far’ which told the compiler to make the pointer 32 bits instead of 16 bits and generate the required code. When Windows 95 came along and VC6 came out the ‘_far’ keyword was no longer supported, because it was not longer needed. All the ‘lp’ references in the code no longer mattered because all the pointers where now the same size, but if your previous code used the macro definitions like ‘LPSTR’ then it would still compile without error because the macros had been changed. If you had used the keyword ‘_far’ in any of your code, then you had to go in and remove it so you could compile the same code on the new compiler.

That is pretty much it, ‘lp’ means ‘p’ now days.


INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
Arun.Immanuel17-May-07 4:19
Arun.Immanuel17-May-07 4:19 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
John R. Shaw17-May-07 5:11
John R. Shaw17-May-07 5:11 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
Arun.Immanuel17-May-07 5:52
Arun.Immanuel17-May-07 5:52 
GeneralOr in C++ (MFC) for that matter... Pin
Rob Grainger17-May-07 2:38
Rob Grainger17-May-07 2:38 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
Vasudevan Deepak Kumar24-May-07 23:23
Vasudevan Deepak Kumar24-May-07 23:23 
Generalwhat is the difference in one _gc * and two _gc *? Pin
syedhasan14-May-07 23:18
syedhasan14-May-07 23:18 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
DavidNohejl15-May-07 0:24
DavidNohejl15-May-07 0:24 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Pete O'Hanlon15-May-07 0:28
mvePete O'Hanlon15-May-07 0:28 
JokeRe: what is the difference in one _gc * and two _gc *? Pin
Vikram A Punathambekar15-May-07 2:32
Vikram A Punathambekar15-May-07 2:32 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Pete O'Hanlon15-May-07 2:54
mvePete O'Hanlon15-May-07 2:54 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Chris Losinger15-May-07 6:03
professionalChris Losinger15-May-07 6:03 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Shog915-May-07 8:06
sitebuilderShog915-May-07 8:06 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Chris Losinger15-May-07 8:23
professionalChris Losinger15-May-07 8:23 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Shog915-May-07 8:46
sitebuilderShog915-May-07 8:46 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Pete O'Hanlon15-May-07 9:17
mvePete O'Hanlon15-May-07 9:17 
GeneralFor loops and array Pin
Mladen Janković14-May-07 5:41
Mladen Janković14-May-07 5:41 
GeneralRe: For loops and array Pin
PIEBALDconsult14-May-07 6:12
mvePIEBALDconsult14-May-07 6:12 

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

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