Slashdot Mirror


Free Pascal 2.2 Has Been Released

Daniel Mantione writes "Free Pascal 2.2 has been released. Several new platforms are supported, like the Mac OS X on Intel platform, the Game Boy Advance, Windows CE and 64-Windows. Free Pascal is now the first and only free software compiler that targets 64-bit Windows. These advancements were made possible by Free Pascal's internal assembler and linker allowing support for platforms not supported by the GNU binutils. The advancement in internal assembling and linking also allow faster compilation times and smaller executables, increasing the programmer comfort. Other new features are stabs debug support, many new code optimizations, resourcestring smart-linking and more."

2 of 284 comments (clear)

  1. Re:Mixed Reaction.... by maxume · · Score: 5, Informative

    You're mixed up on what alliteration is.

    --
    Nerd rage is the funniest rage.
  2. Re:80's college nostalgia by FlyingGuy · · Score: 5, Informative

    Pascal is arguably one of the easiest languages to learn there ever was. It's very verboseness leads to readable code, but don't confuse that with weakness. Modern Pascal implementations like Delphi and Free Pascal are powerful languages.

    The basics of pascal are simple:

    // A simple function
    Function FooFunc(X : integer) : integer ;
    begin
    result := X + 1 ;
    end;

    // A simple Procedure
    Procedure FooProc(var X : integer );
    begin
    X := X + 1 ;
    end;

    Note the difference in the way the function and the procedure are declared above. Pascal passes parameters either by reference or by value. Using the var directive in the procedure declaration of x as integer I told the compiler to pass the value in by reference and therefor that value can be changed by the procedure. Note that when declaring the parameter this way I can ONLY pass a variable to it of the same type, or typecast a variable of a similar type. If I do NOT use the var invocation in declaring the parameter I can pass either a variable or a literal as below:

    // pass in a literal
    Y := FooFunc(1) ;

    // pass in a variable
    Y := FooFunc(i) ;

    // Y will contain the value of the operation of the function.

    FooProc(i) ;

    // The variable i is now modified by the procedure.

    FooProc(1);

    // Illegal syntax, a variable MUST be passed to the procedure.

    This should give you a basic start, the rest is really easy. Pascal does pointers, Structures, file I/O with either typed or untyped files, Inline Coding, Inline Assembler, pretty much everything you would expect from a robust language.
    --
    Hey KID! Yeah you, get the fuck off my lawn!