Source Code for Apple's Lisa Operating System to be Released for Free in 2018

Discussion in 'MacRumors.com News Discussion' started by MacRumors, Dec 27, 2017.

  1. NetMage macrumors newbie

    Joined:
    Oct 21, 2007
    #76
    Except VMS had a C compiler available (I was using it in 1981) and Windows has had a C compiler available from the beginning, and DOS and TRS-DOS and CP/M all had C compilers early. The issue might be more that Unix based OS's dominate today, but if you look for example at the OS'S Perl is ported to, and that are all need a C compiler, you see C is the first compiler available on many OS'S.

    C++ was initially written to target C as its output language because C could essentially be considered a portable assembler, and targeting C gave C++ immediate reach to every common OS.
    --- Post Merged, Jan 1, 2018 ---
    And a really, really old version of BASIC at that.
     
  2. cmaier macrumors G4

    Joined:
    Jul 25, 2007
    Location:
    California
    #77
    No, pascal doesn’t have line numbers. Pascal had functions (procedures).

    PROCEDURE ReadArr(VAR size: Integer; VAR a: IntArrType);
    BEGIN
    size := 1;
    WHILE NOT eof DO BEGIN
    readln(a[size]);
    IF NOT eof THEN
    size := size + 1
    END
    END;

    Pretty c-like other than syntax differences. For example, pointers use ^ instead of *.
     
  3. chucker23n1 macrumors 65816

    chucker23n1

    Joined:
    Dec 7, 2014
    #78
    C wasn't quite as common in 1983 as it was in the 1990s, but "only people working with UNIX used C" is… a stretch. Plenty of platforms had C.
     
  4. jerwin, Jan 2, 2018
    Last edited: Jan 2, 2018

    jerwin macrumors 68000

    Joined:
    Jun 13, 2015
    #79
    or, more jocularly:

    Code:
    program BottlesOfBeer (output);
    {this program plays the 99 bottles of beer song}
    
    const
      BOTTLESSTART = 99;
      BOTTLESEND = 1;
    
    type
      tBottles = BOTTLESEND..BOTTLESSTART;
    
    var
      bottles : tBottles;
    
    begin
      for bottles := BOTTLESSTART downto BOTTLESEND do
      begin
       if bottles > 1 then
       begin
         writeln (bottles,' bottles of beer on the wall, ',bottles, ' bottles of beer.');
         write ('Take one down, pass it around, ');
         writeln (bottles - 1, ' bottles of beer on the wall.');
         writeln
       end
       else
       begin
         writeln ('1 bottle of beer on the wall, one bottle of beer.');
         writeln ('Take one down, pass it around, no more bottles of beer on the wall');
         writeln;
         writeln ('No more bottles of beer on the wall, no more bottles of beer.');
         writeln ('Go to the store and buy some more, 99 bottles of beer on the wall.')  
       end
      end
    end.
    
    vs

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    static void song( int bottles )
    {
       while( (printf("%d bottles of beer on the wall, %d bottles of beer.\n"
                  "Take one down and pass it around, %d bottle%s of beer on the wall.\n\n",
                  bottles, bottles, bottles-1, bottles>2? "s":""), bottles > 2) )
           while( (--bottles,0) ) {}
       while( (puts("1 bottle of beer on the wall, 1 bottle of beer.\n"
                "Take one down and pass it around, no more bottles of beer on the wall.\n\n"
                "No more bottles of beer on the wall, no more bottles of beer.\n"
                "Go to the store and buy some more, 99 bottles of beer on the wall."),0) ) {}
    }
    
    int main()
    {
       while( (song(99), exit(0), 0) ) {}
    }
    
    from http://99-bottles-of-beer.net
    --- Post Merged, Jan 2, 2018 ---


    CuriousMarc also has videos of how he and his Computer History Museum colleagues restored the alto. And not a drop of retrobrite was used!
     

Share This Page