HaxSoft
Aug 29th, 2000, 05:22 AM
Hi, everyone.
I was just wondering if you have any opinions on what the correct way of declaring a function is. I have noticed that quite a lot programmers have strong opinions on how code should be written, and I have many strange habits myself.
For example, some people always declare their functions on one single line. I tend to write them on multiple lines:
Public Declare Function CallWindowProc _
Lib "user32" Alias "CallWindowProcA" ( _
ByVal lpPrevWndFunc As Long, _
ByVal hWnd As Long, _
ByVal Msg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) _
As Long
The reason I like this better is because then I don't have to scroll left/right to read it all. I only do this with long declarations, though. What do you people do?
I was just wondering if you have any opinions on what the correct way of declaring a function is. I have noticed that quite a lot programmers have strong opinions on how code should be written, and I have many strange habits myself.
For example, some people always declare their functions on one single line. I tend to write them on multiple lines:
Public Declare Function CallWindowProc _
Lib "user32" Alias "CallWindowProcA" ( _
ByVal lpPrevWndFunc As Long, _
ByVal hWnd As Long, _
ByVal Msg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) _
As Long
The reason I like this better is because then I don't have to scroll left/right to read it all. I only do this with long declarations, though. What do you people do?