Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 84

Thread: C/C++ vs Pascal

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    C/C++ vs Pascal

    Simple, with bitpacking the compiler does not allocate more than needed, so use 0..1 for 1 bit, 0..3 for 2 bits, 0..7 for 3 bits etc.

    [pascal]
    {$bitpacking on}
    program bitpackingtest;

    type two_nibbles=record
    a,b:0..15;
    end;

    begin
    writeln(sizeof(two_nibbles));
    end.
    [/pascal]

    ... will output 1. It is a new feature of FPC 2.1.4 we coded for Mac Pascal compatibility. Make Borland a feature request

  2. #2

    C/C++ vs Pascal

    refer to CodeGear now still I doubt they'll listen...I haven't seen them implement a new feature users requested for a long time...only features added were just to bridge with Delphi.NET more or less....nonetheless it's a nice feature you added to FPC

  3. #3

    C/C++ vs Pascal

    You guys actually implemented bit-aligned record fields? do they also pack together on bit level or are padded to next byte? what does sizeof return for them?
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  4. #4

    C/C++ vs Pascal

    They are bit aligned. Don't save the last byte of memory, save the last bit of memory :rambo:

    [pascal]
    program bitpack;

    {$bitpacking on}

    var aacked array[0..15] of 0..63;

    begin
    writeln(sizeof(a));
    end.
    [/pascal]

    daniel@laptop:~> ./bitpack
    12
    daniel@laptop:~>

  5. #5
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    C/C++ vs Pascal

    You know thats actually quite handy if you're working with things like older tracker module formats and the like.

    How long until you think that FPC is going to start giving the current Delphi compiler a run for it's money? Besides .NET and the fact that FPC has a huge platform support base comparable to no other than GCC.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  6. #6

    C/C++ vs Pascal

    In what way is the current Delphi compiler still superior? So, I think when has to be answered with "now" if we are looking at the compilers.

  7. #7

    C/C++ vs Pascal

    I think the Delphi compiler has a few things I would miss in FPC. But most of those are the new additions like class variables and all the OOP goodness

    On the RTL side I think FPC is still a bit more clunky and heavy to work with. On several occasions I've managed to crash the compiler when working with some exotic libraries and stuff. (This is a while back so I don't know if the problem persists and didn't know where to report such bugs)

    The FPC community also seems a little hidden and/or old-fashioned. Is there actually a specific Freepascal community?
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  8. #8

    C/C++ vs Pascal

    Well, the mailing lists and 800 and 500 members and get hundreds of messages per month. There are 12000 user accounts in the community system with a about 200 messages per month. The Wiki is actively used. So, yes, I think there is a Free Pascal community and it is rather large.

    There is and has always been a link to the bug tracker on the front page, so I don't think it can be so hard to find out how to report a bug.

  9. #9

    C/C++ vs Pascal

    What I don't like on freepascal site is the forum engine. It has not changed from years. Any particular reason to stick with it instead of some newer engines? I think community suffers a bit because of it. Or maybe its only me;-)

  10. #10

    C/C++ vs Pascal

    There are more people have that commented on the forums both in positive as in negative way. Technically the system is one of the most advanced you can find; it wouldn't make sense to drop it, but there is quite a bit you can do with the UI, i.e. http://www.virtualmin.com/forums/ has the same engine, but a totally different presentation.

    I prefer the categorized Q&A over for example a threaded or UBB styled UI like PGD has though. If somebody has ideas, they are welcome though.

Page 3 of 6 FirstFirst 12345 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •