80 character width

Started by
5 comments, last by mutex 19 years, 2 months ago
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.
Advertisement
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.
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.
Ah, that is why I love high resolutions. Both of Dead Eye's examples fit on my screen just fine.
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;
Quote:Original post by KrazeIke
Ah, 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.
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.

This topic is closed to new replies.

Advertisement