Wheels-Of-Fire

Forum Replies Created

Viewing 20 posts - 1,401 through 1,420 (of 1,996 total)
  • Author
    Posts
  • in reply to: Learning to program #27502
    Wheels-Of-FireWheels-Of-Fire
    Participant
      @grahamdearsley
      Forumite Points: 4

      Why is there no easy way to rename a project from within Visual Studio ? I just noticed I named a small experiment “FeaderFiles” instead of “HeaderFiles”. Not really a problem this time but annoying.

      in reply to: Learning to program #27501
      Wheels-Of-FireWheels-Of-Fire
      Participant
        @grahamdearsley
        Forumite Points: 4

        As promised here is the tiny bit of C++ code that pops up a Windows dialogue box  from a console App.

        #include “pch.h”

        #include <iostream>

        #include <Windows.h>

        int main()

        {

        int msgboxID = MessageBoxA(NULL, “Hello World”, “My Box”, 0);

        return msgboxID;

        }

        If you paste this into Visual Studio it will compile and run as long as you have a fairly recent version of the Windows SDK installed.

        in reply to: Brexit now = CETA +/-? #27400
        Wheels-Of-FireWheels-Of-Fire
        Participant
          @grahamdearsley
          Forumite Points: 4

          Nop you dont see it oh well

          in reply to: Brexit now = CETA +/-? #27394
          Wheels-Of-FireWheels-Of-Fire
          Participant
            @grahamdearsley
            Forumite Points: 4

            They will happily take your money if you pop over for a holiday but remember they are taking money.

            in reply to: Brexit now = CETA +/-? #27393
            Wheels-Of-FireWheels-Of-Fire
            Participant
              @grahamdearsley
              Forumite Points: 4

              I will say again. Why do you like them ? They hate you and me.

              in reply to: Brexit now = CETA +/-? #27392
              Wheels-Of-FireWheels-Of-Fire
              Participant
                @grahamdearsley
                Forumite Points: 4

                Why do you want the EU them ? Why why why ? What for ? You think they know better than the UK people. You dont think they are out to rob us blind ?  They ARE.

                in reply to: Brexit now = CETA +/-? #27391
                Wheels-Of-FireWheels-Of-Fire
                Participant
                  @grahamdearsley
                  Forumite Points: 4

                  Yep it looks like they are going to be able to stick a finger up to our leave vote.

                  in reply to: Brexit now = CETA +/-? #27385
                  Wheels-Of-FireWheels-Of-Fire
                  Participant
                    @grahamdearsley
                    Forumite Points: 4

                    Perhaps they will but I dont see it myself. I REALLY want to stick two fingers up at THEIR common fishing policy and THEIR comnon farming policy and THEIR customs union. Really Really up theirs.

                    in reply to: Brexit now = CETA +/-? #27379
                    Wheels-Of-FireWheels-Of-Fire
                    Participant
                      @grahamdearsley
                      Forumite Points: 4

                      I sense another Oh come on moment here ?. C4 neutral ? They have a legal requirement in their charter to be perverse dont they ? And the Universities of Birmingham, Durham and Newcastle ? I dont know why they are totally against Brexit but everything they come out with says they are. Could be an EU grant thing ?

                      The EU can have any border arangements it likes if it wants to. Look at the swiss or for that matter any other country the EU borders.

                      in reply to: Brexit now = CETA +/-? #27350
                      Wheels-Of-FireWheels-Of-Fire
                      Participant
                        @grahamdearsley
                        Forumite Points: 4

                        Dear Ed. Oh come on you must have spotted I was just being deliberately annoying ? But as you took the bait if we are not going to put up a hard border with N Ireland and the EU wont either then who will ? Ireland ? Cant see it myself.

                        in reply to: Learning to program #27349
                        Wheels-Of-FireWheels-Of-Fire
                        Participant
                          @grahamdearsley
                          Forumite Points: 4

                          Yes indeed I am lazy given the chance ? let someone else write a public domain function and I will use it ! That includes all the functions Microsoft makes avaliable. Include Windows.h at the start of your code and you can call most of them. I will put up a very simple bit of C that displays a “Hello world” dialogue box when I come off the beer tomorrow (It is friday night ?) A real windows box from a console app.

                          in reply to: Learning to program #27343
                          Wheels-Of-FireWheels-Of-Fire
                          Participant
                            @grahamdearsley
                            Forumite Points: 4

                            Oh yes the BASIC USR function will push the program counter on to the stack followed by your arguments followed by the number of arguments you passed. Your routine must pull the arguments and the number of arguements off the stack before returning with an RTS instruction or you will return to a nonsence address.

                            in reply to: Learning to program #27342
                            Wheels-Of-FireWheels-Of-Fire
                            Participant
                              @grahamdearsley
                              Forumite Points: 4

                              Here is a thing i did not expect. The more I look into C functions the more I understand functions in Atari BASIC. For instance FRE(0) will return the amount of free user memory avaliable to BASIC and RND(0) will get you a random number. Both are functions and require an input variable. In this case it is 0 and is the same as null. I did not know why I had to send something before.

                              Another thing is C is strongly typed and so is Atari BASIC. You can have a simple variable that you must declare and assign at the same time with something like A=10. A will get 8 bytes in memory and it will be of type signed floating point. You can also have an array but it must be dimentioned first with something like DIM A(10). That will get you an array with ten 8 byte elements. Or you can have a matrix with DIM (10,10).

                              String variables are the last type you can have and they must be dimentioned too with DIM A$(10) or such like. That will get you 10 bytes of memory asigned as ATASCII (Atari ASCII) charachters. If you want to know the memory location of a string then you can use x=ADR(A$). This is handy for short machine code functions. A=USR(ADR(A$), argument, argument, etc). Put your routine in the string and BASIC will use it as a pointer. If you are going to return a value to A then there are 2 bytes in page 3 of memory to store your value.

                              in reply to: Brexit now = CETA +/-? #27341
                              Wheels-Of-FireWheels-Of-Fire
                              Participant
                                @grahamdearsley
                                Forumite Points: 4

                                All going a bit flat on the negotiation front. I do wish Mrs May would get on with her great surrender so I can have have something to be outraged about ?

                                in reply to: Brexit now = CETA +/-? #27220
                                Wheels-Of-FireWheels-Of-Fire
                                Participant
                                  @grahamdearsley
                                  Forumite Points: 4

                                  I may have mentioned this before but I flew back to Heathrow from Thailand in 2003 and was surprised to find a UK passports only que at immigration. Our que had 5 people in it and the all other passports que had a jumbo jets worth. The man in front of me presented and EU passport and was told ” Yes you have the same right of entry as someone with a UK passport but this que is for UK passports only so you must join the other que”. Nearly laughed my head off.

                                  The other thing I noticed was the number of people in the all other que clutching EU passports. What were these peoples travel plans ?

                                  in reply to: Brexit now = CETA +/-? #27218
                                  Wheels-Of-FireWheels-Of-Fire
                                  Participant
                                    @grahamdearsley
                                    Forumite Points: 4

                                    Can be sky blue pink for all I care as long as they take all reference to the EU off it.

                                    in reply to: Learning to program #27211
                                    Wheels-Of-FireWheels-Of-Fire
                                    Participant
                                      @grahamdearsley
                                      Forumite Points: 4

                                      In case you were wondering “cout<<” is a newer alternative to “printf” using an output stream. Corse I may be teaching granny to suck eggs here ?

                                      in reply to: Learning to program #27207
                                      Wheels-Of-FireWheels-Of-Fire
                                      Participant
                                        @grahamdearsley
                                        Forumite Points: 4

                                        I am extending my knowlage of C into C++. I must admit that I am a bit rusty with C so it is a good thing that the course covers the common basics before moving on to C++ specifics like classes.

                                        I completed the introduction to C++ course in less than a week (with a 100% score I might add ?) and Im now part way through the intermediate course.

                                        I don’t always use perfect syntax here but the code example I posted will compile and run in Visual Studio as I pasted it from there.

                                        When I get in I will load up the code and step through it with Auto variable display turned on. I will see what the value of Avariable is when I just step into a function without executing any of its instructions.

                                        in reply to: Learning to program #27204
                                        Wheels-Of-FireWheels-Of-Fire
                                        Participant
                                          @grahamdearsley
                                          Forumite Points: 4

                                          Its in the question. The first one asks for a value on RETURN from a function. The second one asks for the value on CALLING a function, no mention is made of executing the function let alone returning from it. An earlier exercise asked us output the value of a pointer that we passed to a function straight after the function was called and before it returned so I answered question 2 as it was writtern after reading it twice. Just making sure im not being dumb before I raise the point on the edX forum ?

                                          in reply to: Auto refresh #27202
                                          Wheels-Of-FireWheels-Of-Fire
                                          Participant
                                            @grahamdearsley
                                            Forumite Points: 4

                                            We are getting into the realms of using Process Monitor from Sysinternals here. This would involve delving through a large log file with filters and looking at stack traces. If you want to give it a go then I can give you some pointers or I may even be talked into looking through a copy of the log myself ?

                                          Viewing 20 posts - 1,401 through 1,420 (of 1,996 total)