dddancer.com: Home of the Freedom IDE and ASL - A Simple Language
Home of Freedom and ASL - A Simple Language
ddDancer.com
A simple example is this Windows message handler. At the top is some Win32 C stuff that looks like a function declaration. There are a few words that don’t look like C. The rule is: If it looks like C it is C, otherwise it’s a token. The words messages_xxx are tokens for swatches of code that define messages of a given class.

		LRESULT CALLBACK WndProc(
			    HWND      	hWnd,
			    UINT      	message,
			    WPARAM    	wParam,
			    LPARAM    	lParam
			    ){

		    // Win32 message handler.

		    WndProc_setup

		    switch (message){
		        messages_mouse
		        messages_keyboard
		        messages_frame
		        messages_windows
		        messages_default
		    }
		    return 0;
		}

The code is a plain old switch statement in the Win32 style. But it’s easy to see what it does, and we know right away where to look for given types of messages. If for some reason you want to see the whole thing (never happens), you can hit [F11] to assemble the 350 line C source.

This is the same code as the 350 line function, but it all fits on one screen and it's easy to see what it does.

For more information contact:
Contact us for more info.