Hello ALL!
Here is what the help says...
Here is a little template program that I wrote. It seems as though
the size of this file after it has been compiled is the same even
if
is set. Can anybody explain why?
------------------
Cheers
Here is what the help says...
Code:
Syntax #DEBUG ERROR [ON|+ | OFF|-] The ERROR option specifies whether the compiler should generate code that checks for certain types of errors wherever they may occur (with the exception of disk I/O, where errors are always caught). It is best to enable error-checking when developing a program; the default setting is OFF. Once all of the more obvious bugs have been eradicated, you will want to turn error-checking off, as this will make your code smaller and faster. The final (production) version of a program should not contain any error-checking code. #DEBUG ERROR is always enabled during compilation for debugging.
Here is a little template program that I wrote. It seems as though
the size of this file after it has been compiled is the same even
if
Code:
#debug error on
Code:
rem Template.bas rem #compile exe #register none #option version5 #debug error off #dim all rem windows headers #include "windows.inc" %MAXCLASSSTRING = 64 function WinMain(byval hInstance as long,_ byval hPrevInstance as long,_ szCmdLine as asciiz ptr,_ byval nCmdShow as long) as long dim szWindowClass as asciiz * %MAXCLASSSTRING dim wcex as WNDCLASSEX dim msg as TAGMSG dim hWnd as long rem setup window class szWindowClass = "TemplateWindow" wcex.cbSize = sizeof(wcex) wcex.style = %CS_DBLCLKS or %CS_HREDRAW or %CS_VREDRAW wcex.lpfnWndProc = codeptr(MainProc) wcex.cbClsExtra = 0 wcex.cbWndExtra = 0 wcex.hInstance = hInstance wcex.hIcon = LoadIcon(%NULL,byval %IDI_APPLICATION) wcex.hIconSm = LoadIcon(%NULL,byval %IDI_APPLICATION) wcex.hCursor = LoadCursor(%NULL,byval %IDC_ARROW) wcex.hbrBackground = GetSysColorBrush(%COLOR_3DFACE) wcex.lpszClassName = varptr(szWindowClass) wcex.lpszMenuName = %NULL rem register window class RegisterClassEx wcex hWnd = CreateWindow(szWindowClass,_ szWindowClass,_ %WS_OVERLAPPEDWINDOW,_ %CW_USEDEFAULT,_ %CW_USEDEFAULT,_ %CW_USEDEFAULT,_ %CW_USEDEFAULT,_ %HWND_DESKTOP,_ %NULL,_ hInstance,_ byval %NULL) ShowWindow hWnd,nCmdShow UpdateWindow hWnd while GetMessage(msg,%NULL,%NULL,%NULL) TranslateMessage msg DispatchMessage msg wend function = msg.wParam end function function MainProc(byval hWnd as long,_ byval message as long,_ byval wParam as long,_ byval lParam as long) export as long select case (message) case %WM_DESTROY PostQuitMessage errclear end select function = DefWindowProc(hWnd,message,wParam,lParam) end function
------------------
Cheers
Comment