0 Members and 1 Guest are viewing this topic.
Piru wrote:Wikipedia: Indent Style#BSD/Allman styleBasically it's easier to read: More "spacious" and it's easier to see where blocks start and end (just find visually matching brackets).This is not the universally superior indent style, but it is fairly common. However, the most important thing is to stay consistent: When you choose a style, stick to it. Don't change styles (at least not within the same project).See more at Wikipedia: Programming style
CannonFodder wrote:Hallelujah I am not alone in this world!Much better.
CannonFodder wrote:Code: [Select]void MFreeVec( APTR memoryBlock ) { if (SysBase->LibNode.lib_Version >= 36) { FreeVec(memoryBlock); } else if (MemoryBlock) { unsigned long byteSize; unsigned long *data; data = (unsigned long*)memoryBlock; data--; byteSize = *data; FreeMem(data, byteSize); }}Much nicer. ;-)
void MFreeVec( APTR memoryBlock ) { if (SysBase->LibNode.lib_Version >= 36) { FreeVec(memoryBlock); } else if (MemoryBlock) { unsigned long byteSize; unsigned long *data; data = (unsigned long*)memoryBlock; data--; byteSize = *data; FreeMem(data, byteSize); }}
CannonFodder wrote:Code: [Select]void MFreeVec( APTR memoryBlock ) { if (SysBase->LibNode.lib_Version >= 36) FreeVec(memoryBlock); else if (MemoryBlock) { unsigned long byteSize; unsigned long *data; data = (unsigned long*)memoryBlock; data--; byteSize = *data; FreeMem(data, byteSize); }}
void MFreeVec( APTR memoryBlock ) { if (SysBase->LibNode.lib_Version >= 36) FreeVec(memoryBlock); else if (MemoryBlock) { unsigned long byteSize; unsigned long *data; data = (unsigned long*)memoryBlock; data--; byteSize = *data; FreeMem(data, byteSize); }}
Piru wrote:Oh no, yet another holy war... But of course it's a matter of taste....Except that BSD/Allman is teh bestest!!!1:-D