Results 1 to 10 of 39

Thread: Trouble porting liquid simulation to Pascal - AARRGGHH!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #28
    Quote Originally Posted by paul_nicholls View Post
    I believe there is a setting in Lazarus (and I guess freepascal too) where you can use +=, -=, etc. operators, but I don't know about ++ and --

    cheers,
    Paul
    Correct, and += and -= are pretty useful. ++ and --, however, I'd rather live without, especially when used for throwing in side effects while doing other things.

    You even have << and >> in FPC. It is sensible, the few times where C syntax makes sense there is no reason not to incorporate it. But finding C-style "for" loops is something that was supposed to be working Pascal code, that was scary. One detail that makes me uncertain is the ability to spread variable declarations all over the place. Should variables be at one place or anywhere? Defining a variable locally within a for loop or inside a begin-end pair, well, not entirely unreasonable... or is it just a workaround for messy code, when C programmers write entirely too big functions?

    Anyway, now that I know what files to look for I can compare what we do.
    Last edited by Ingemar; 31-08-2011 at 08:55 AM.

Tags for this Thread

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
  •