• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Only of interest to Old Gits

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Only of interest to Old Gits



    At 13:45 on R4 there's a programme all about FORTRAN.

    I knew you'd all be interested.

    I'm writing a letter of complaint engraved on a stone tablet cos they've called it "Fortran" in the Radio Times.

    Seems to be part of some "digital" season thingie they've got going on at the moment.

    Yesterday some woman was wittering on about machine code and LEO (Lyons Electronic Office, the first commercial computer).

    It was called "Ways of Thinking".

    Implied that we geeks are almost creative.

    http://www.bbc.co.uk/programmes/b05pl2rx
    Last edited by zeitghost; 6 April 2015, 12:34.

    #2
    Happy days with memory constrained programming optimisation, where using low-level subroutines to save 10 instructions was important...

    Quick test for those who can remember COBOL or FORTRAN - how would you write a subroutine to check for a leap year. Without using a divide command. And without using a number 4...
    Blog? What blog...?

    Comment


      #3
      Originally posted by malvolio View Post
      Happy days with memory constrained programming optimisation, where using low-level subroutines to save 10 instructions was important...

      Quick test for those who can remember COBOL or FORTRAN - how would you write a subroutine to check for a leap year. Without using a divide command. And without using a number 4...
      Why would you write a subroutine to check for a leap year without using a divide command and without using a number 4?

      Comment


        #4
        Originally posted by malvolio View Post
        Quick test for those who can remember COBOL or FORTRAN - how would you write a subroutine to check for a leap year. Without using a divide command. And without using a number 4...
        Does that include Pope Gregory's 100 yearly exception, and the 400 yearly exception to the exception?
        Work in the public sector? Read the IR35 FAQ here

        Comment


          #5
          Originally posted by mudskipper View Post
          Why would you write a subroutine to check for a leap year without using a divide command and without using a number 4?
          To save several hundred low-level commands a da chunk of storage.
          Blog? What blog...?

          Comment


            #6
            Originally posted by OwlHoot View Post
            Does that include Pope Gregory's 100 yearly exception, and the 400 yearly exception to the exception?
            Yes.
            Blog? What blog...?

            Comment


              #7
              Not at all, this is also of interest to me.
              I'm alright Jack

              Comment


                #8
                I haven't done COBOL since 1990, but I'd guess it's probably using some kind of built in date functions.

                In ABAP

                DATA helper_date TYPE d.
                helper_date = i_year_to_check && |0301|.
                SUBTRACT 1 FROM helper_date
                IF get_day( helper_date ) EQ '29'.
                r_is_leapyear = abap_true.
                ELSE.
                r_is_leapyear = abap_false.
                ENDIF.
                Down with racism. Long live miscegenation!

                Comment


                  #9
                  Originally posted by NotAllThere View Post
                  I haven't done COBOL since 1990, but I'd guess it's probably using some kind of built in date functions.

                  In ABAP

                  DATA helper_date TYPE d.
                  helper_date = i_year_to_check && |0301|.
                  SUBTRACT 1 FROM helper_date
                  IF get_day( helper_date ) EQ '29'.
                  r_is_leapyear = abap_true.
                  ELSE.
                  r_is_leapyear = abap_false.
                  ENDIF.
                  Neat, but no. You have a subtract instead of a divide, but that's still too many instructions in the target languages.
                  Blog? What blog...?

                  Comment


                    #10
                    Originally posted by zeitghost View Post
                    Yesterday some woman was wittering on about machine code and LEO (Lyons Electronic Office, the first commercial computer).
                    My geeky claim to fame is that my grandmother's cousin was on the team of people who designed the LEO computer system.
                    • The meaning of life is to give life meaning
                    • Worrying about tomorrow spoils today

                    Comment

                    Working...
                    X