Yes wasn't too serious, forgot to add smileys , but I do have horrible memory. One significant aspect is that I do not code full time, it's a side aspect of my job, and often done in time-fragmented chunks.
Yes wasn't too serious, forgot to add smileys , but I do have horrible memory. One significant aspect is that I do not code full time, it's a side aspect of my job, and often done in time-fragmented chunks.
I'm a hobby programer myself. Maybe if all goes well I will become full-time programer in the future. But till then I still have to learn a bit.
Those overloaded iff functions are not so unreadable at all.
I think they are great (especially for string concatenation), especially since with later delphi and fpc you can inline them, and not suffer any (correct me) performance penalty for calling a function (stack allocations, etc..)
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
It depends on what you do with the parameters. I mean, the next code:
generates the same executable than:Code:TheVariable := IFF (Something, TheVariable + 15, TheVariable * 2);
May be the compiler can optimize it but I doubt FPC or Delphi are so smart even with -O4. In that case C's "?:" would generate faster code.Code:Tmp1 := TheVariable + 15; Tmp2 := TheVariable * 2; TheVariable := IFF (Something, Tmp1, Tmp2);
No signature provided yet.
Bookmarks