80 character width

Recommended Posts

Lode    1003
Do you limit your code to 80 characters wide? I don't, and my code width goes over the 80 quite often, especially in mathematical formulas with long variable names.

Share on other sites
you mean something like:

 // creation window properties DWORD style_ex = WS_EX_APPWINDOW; DWORD style = WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; char* cname = "STDWINDOW"; char* title = "STDWINDOW"; int x = 0; int w = 1280; int y = 0; int h = 1024; // create window HWND retval = CreateWindowEx(style_ex, cname, title, style, x, y, w, h, 0, 0, slGetInstance(), 0); if(!retval) return 0; ShowWindow(retval, SW_SHOW); return retval;

to prevent this...?

 HWND retval = CreateWindowEx(WS_EX_APPWINDOW, "STDWINDOW", "STDWINDOW", WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0, 0, 1280, 1024, 0, 0, slGetInstance(), 0); if(!retval) return 0; ShowWindow(retval, SW_SHOW); return retval;

yes. sometimes :). if speed is critical though, no.

Share on other sites
KrazeIke    256
Since I'm the only one that has to read my code, I usually limit mine to the width of the visual studio editor maximized at a 1600x1200 resolution. Most stuff fits.

Share on other sites
KrazeIke    256
Ah, that is why I love high resolutions. Both of Dead Eye's examples fit on my screen just fine.

Share on other sites
jfk    122
I guess he means something like this:
 HWND retval = CreateWindowEx(WS_EX_APPWINDOW, "STDWINDOW", "STDWINDOW", WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0, 0, 1280, 1024, 0, 0, slGetInstance(), 0); if(!retval) return 0; ShowWindow(retval, SW_SHOW); return retval;

Share on other sites
Quote:
 Original post by KrazeIkeAh, that is why I love high resolutions. Both of Dead Eye's examples fit on my screen just fine.

lol, last time i adjusted my screen to 1600x1200 it gave my eyes fits
trying to read shortcut names in explorer.

Share on other sites
mutex    1111
I'm running at 1680x1050; it helps if your screen is naturally large, otherwise high resolutions are painful. As for code formatting, I avoid long lines anyway. When it comes to function calls with many parameters, sticking them all on one line makes it difficult to determine what parameters are what.