1.

Solve : Program not working!?

Answer»

I will answer all the questions ... again ....

I searched for for nulgoto

I searched for >>

The program is fully debugged as I go. I added a section and kaboom!

Turning echo on would be useless as seeing it would EXIT before I could see anything.

On the other hand I could take pictures until I get a picture of the program while echos on .

I already said that I was exaggerating about people stealing the code. I still have 30kb to go before we get to that point (currently 20kb).

But just as an example of code that has been stolen. There's this one program that locks folders. The guy gave out the code and now I see tons of the same code and they all claim it's theirs (The code didn't even work). Oh, and some kid copied the program. Then he gave it too his buddies and so on.



EDIT: Dias YOU'RE A GENIUS! The new section I made has 142 labels. I have many labels yet to come!

EDIT 2:It worked!Quote

The new section I made has 142 labels. I have many labels yet to come!

Obviously not an alumni of KISS University. What is KISS university. Or is that just slang for something I would never know .OMG. you show your beginnership with almost every post. Especially when you haven't heard of basic programming principles/practices.

It's an acronym.Quote from: BC_programmer
you show your beginnership with almost every post.

"almost"? Quote from: Dias de verano on January 19, 2009, 12:19:24 AM
Quote from: BC_programmer
you show your beginnership with almost every post.

"almost"?

alright, I was being a bit conservative...Ok, tell me a replacement for labels .

Quote
Especially when you haven't heard of basic programming principles/practices.


How?Quote from: BatchFileCommand on January 19, 2009, 08:48:55 AM
How?

*censored* is a root square? Closest REAL math term I can think of is Square Root.


Quote from: BatchFileCommand on January 19, 2009, 08:48:55 AM

Quote
Especially when you haven't heard of basic programming principles/practices.


How?

I'll show you.


Quote from: BatchFileCommand on January 18, 2009, 07:48:06 PM
What is KISS university. Or is that just slang for something I would never know .
that the given in the proof.
Thank goodness I'm not an alumni of KISS university.

I bet you are. What a slacker! Wasting your time posting messages on the internet. You're LIKE 25 years old.


Quote from: BatchFileCommand on January 19, 2009, 07:47:07 PM
Thank goodness I'm not an alumni of KISS university.

I bet you are. What a slacker! Wasting your time posting messages on the internet. You're like 25 years old.



KISS is a god damned acronym! tried google yet? it comes up pretty quick. It stands for "Keep It Simple, Stupid" which is a basic tenet it keeping code maintainable, a effort you obviously haven't put FORTH; and will have difficulty putting forth given your lack of effort in doing a simple google search to define the acronym, or even taking an extra second to look at my profile and see that I am actually 21 years old.

Warranted- it IS a batch file, and a lot of basic tenets of programming can be willfully ignored (such as never using gotos... "Goto considered harmful")... SINCE goto is kind of all you have with batch, it goes without saying that that rule needs to be ignored.

another basic programming technique is to give labels and variables a meaningful name don't have your code here, so I don't know about the variables, but the labels surely aren't the most descriptive symbols one could concieve.


and in the spirit of asking questions- what is the following missing? It's missing a single line... without it the window the procedure is attached to will not be responsive to any input or other system messages.

Code: [Select]LRESULT CALLBACK WndProcedure(HWND hwnd,
UINT message,
WPARAM wparam
LPARAM lparam)
{
switch(message)
{
case WM_CREATE:

break;
case WM_COMMAND:
break;


}

}
That's not batch file. Because in batch files you don't have methods like that ( but you do have grouping). I'm not sure but I'm going to say
Quote
Code: [Select] break;
case WM_COMMAND:
break;


}

}

That's you key ( I think). Just a guess.Quote from: BatchFileCommand on January 20, 2009, 06:14:14 AM
That's not batch file. Because in batch files you don't have methods like that ( but you do have grouping). I'm not sure but I'm going to say
Quote
Code: [Select] break;
case WM_COMMAND:
break;


}

}

That's you key ( I think). Just a guess.

hmm, not sure what's different there. The syntax of the original was ok- it was just missing a necessary function call. In a way, it was actually a trick question.

Anyway- nope, wasn't batch, that was C- So in a way one could say I was cheating... Not everybody programs in C, and even fewer of them write window procedures... but it was actually missing a single, very important line:


Code: [Select]
LRESULT CALLBACK WndProcedure(HWND hwnd,
UINT message,
WPARAM wparam
LPARAM lparam)
{
switch(message)
{
case WM_CREATE:

break;
case WM_COMMAND:
break;


}
return DefWindowProc(hStatusWnd, uMsg, wParam, lParam);
}

Since the code there doesn't actually do anything- it has to pass the message on to the default window procedure. One might ASK, "whats that do?"... well, the default window procedure provides default handling for window sizing and movement, as well as handling the "close" button when it's clicked.

Without it- the window won't even paint- none of the buttons will do anything, mousing over the border won't work, etc.

It's really quite a useful procedure though, I've had to subclass a Visual Basic form several times so that I could write my own window procedure for stuff VB didn't provide, usually messages introduced from Windows 2000 onwards.

You see . I'm not completely incompetent. I was thinking it was some kind of C language. Quote from: BC_Programmer on January 19, 2009, 08:01:22 PM
Quote from: BatchFileCommand on January 19, 2009, 07:47:07 PM
Thank goodness I'm not an alumni of KISS university.

I bet you are. What a slacker! Wasting your time posting messages on the internet. You're like 25 years old.



"Keep It Simple, Stupid"

That's an extremely old acronym...my TEACHER uses the KISS principle.


Discussion

No Comment Found