Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Program not working!  (Read 8090 times)

0 Members and 1 Guest are viewing this topic.

BatchFileCommand

    Topic Starter


    Hopeful
  • Thanked: 1
    Re: Program not working!
    « Reply #15 on: January 17, 2009, 05:52:12 PM »
    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  :P.

    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 <censored> 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!
    οτη άβγαλτος μεταφ βαθμολογία

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: Program not working!
    « Reply #16 on: January 18, 2009, 12:48:54 PM »
    Quote
    The new section I made has 142 labels. I have many labels yet to come!

    Obviously not an alumni of KISS University. ;D
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    BatchFileCommand

      Topic Starter


      Hopeful
    • Thanked: 1
      Re: Program not working!
      « Reply #17 on: January 18, 2009, 07:48:06 PM »
      What is KISS university. Or is that just slang for something I would never know  ::).
      οτη άβγαλτος μεταφ βαθμολογία

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: Program not working!
      « Reply #18 on: January 18, 2009, 08:06:11 PM »
      OMG. you show your beginnership with almost every post. Especially when you haven't heard of basic programming principles/practices.

      It's an acronym.
      I was trying to dereference Null Pointers before it was cool.

      Dias de verano

      • Guest
      Re: Program not working!
      « Reply #19 on: January 19, 2009, 12:19:24 AM »
      Quote from: BC_programmer
      you show your beginnership with almost every post.

      "almost"?  :)

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: Program not working!
      « Reply #20 on: January 19, 2009, 12:20:21 AM »
      Quote from: BC_programmer
      you show your beginnership with almost every post.

      "almost"?  :)

      alright, I was being a bit conservative...
      I was trying to dereference Null Pointers before it was cool.

      BatchFileCommand

        Topic Starter


        Hopeful
      • Thanked: 1
        Re: Program not working!
        « Reply #21 on: January 19, 2009, 08:48:55 AM »
        Ok, tell me a replacement for labels :P.

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


        How?
        οτη άβγαλτος μεταφ βαθμολογία

        Dias de verano

        • Guest
        Re: Program not working!
        « Reply #22 on: January 19, 2009, 10:51:53 AM »

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: Program not working!
        « Reply #23 on: January 19, 2009, 07:35:39 PM »
        *censored* is a root square? Closest REAL math term I can think of is Square Root.



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


        How?

        I'll show you.


        What is KISS university. Or is that just slang for something I would never know  ::).
        that the given in the proof.
        « Last Edit: January 19, 2009, 11:23:21 PM by BC_Programmer »
        I was trying to dereference Null Pointers before it was cool.

        BatchFileCommand

          Topic Starter


          Hopeful
        • Thanked: 1
          Re: Program not working!
          « Reply #24 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.


          οτη άβγαλτος μεταφ βαθμολογία

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: Program not working!
          « Reply #25 on: January 19, 2009, 08:01:22 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;
                 
                   
                   }

          }
          I was trying to dereference Null Pointers before it was cool.

          BatchFileCommand

            Topic Starter


            Hopeful
          • Thanked: 1
            Re: Program not working!
            « Reply #26 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.
            οτη άβγαλτος μεταφ βαθμολογία

            BC_Programmer


              Mastermind
            • Typing is no substitute for thinking.
            • Thanked: 1140
              • Yes
              • Yes
              • BC-Programming.com
            • Certifications: List
            • Computer: Specs
            • Experience: Beginner
            • OS: Windows 11
            Re: Program not working!
            « Reply #27 on: January 20, 2009, 06:55:51 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. :o

            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.

            I was trying to dereference Null Pointers before it was cool.

            BatchFileCommand

              Topic Starter


              Hopeful
            • Thanked: 1
              Re: Program not working!
              « Reply #28 on: January 20, 2009, 03:19:04 PM »
              You see  ;D. I'm not completely incompetent. I was thinking it was some kind of C language.
              οτη άβγαλτος μεταφ βαθμολογία

              Helpmeh



                Guru

              • Roar.
              • Thanked: 123
                • Yes
                • Yes
              • Computer: Specs
              • Experience: Familiar
              • OS: Windows 8
              Re: Program not working!
              « Reply #29 on: January 20, 2009, 04:11:17 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.
              Where's MagicSpeed?
              Quote from: 'matt'
              He's playing a game called IRL. Great graphics, *censored* gameplay.