Recent

Author Topic: problem with Create inheritance  (Read 10220 times)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8831
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: problem with Create inheritance
« Reply #15 on: June 24, 2013, 02:15:46 pm »
Quote
I am starting to wonder: could it be that I'm the only one trying to use $X- on pfc?
There was a discussion loooooooooong ago (started by me if I'm not mistaken) and in the end it's the programmer's awareness that must be increased in order not to falsely discard function result while keeping {$X+} as the default. But regarding:
Quote
Operation ">" not supported for types "Pointer" and "Pointer"
I think it's really a bug (if not yet solved in trunk). At least if not accepted, the compiler should say something more sane.

Frederic Da Vitoria

  • Jr. Member
  • **
  • Posts: 73
Re: problem with Create inheritance
« Reply #16 on: June 24, 2013, 02:33:58 pm »
OK. How can I get the trunk version of FPC in order to check? If the issue is still there I'll file a bug.

And until the bug is fixed, I'll replace $X- with $X+ in the 173 units of my project. I am glad current text editors are able to do mass replace  :)
davitof
Lazarus 1.0.10 + FPC 2.6.2 / Windows7 64bits

Leledumbo

  • Hero Member
  • *****
  • Posts: 8831
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: problem with Create inheritance
« Reply #17 on: June 24, 2013, 03:27:13 pm »
Quote
OK. How can I get the trunk version of FPC in order to check? If the issue is still there I'll file a bug.
I just checked, it's still there. Feel free to report.

Frederic Da Vitoria

  • Jr. Member
  • **
  • Posts: 73
Re: problem with Create inheritance
« Reply #18 on: June 24, 2013, 03:31:55 pm »
Thanks. I'll add a post here as soon as I'm done (which may take a few hours, I'm currently at work)
davitof
Lazarus 1.0.10 + FPC 2.6.2 / Windows7 64bits

Frederic Da Vitoria

  • Jr. Member
  • **
  • Posts: 73
Re: problem with Create inheritance
« Reply #19 on: June 24, 2013, 04:23:35 pm »
davitof
Lazarus 1.0.10 + FPC 2.6.2 / Windows7 64bits

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: problem with Create inheritance
« Reply #20 on: June 24, 2013, 07:58:33 pm »
Quote
I am starting to wonder: could it be that I'm the only one trying to use $X- on pfc?

It's possible. There are many cases where function result is not needed every time. Storing it to temporary variable is just waste of CPU power, and might give you hint instead, for unused variable.

Frederic Da Vitoria

  • Jr. Member
  • **
  • Posts: 73
Re: problem with Create inheritance
« Reply #21 on: June 24, 2013, 08:39:46 pm »
I understand. OTOH, I lived with $X- in Delphi by telling myself that if such a situation happened, it meant that my design was poor and that this function should really be a procedure. But I was able to do this only because even in $X- Dephi did not consider constructors as functions. FPC deciding to enforce this rule on constructors will maybe deprive me of this stylistic hint. Granted, this is quite minor and FPC/Lazarus have many advantages which largely overcome this little drawback :)
davitof
Lazarus 1.0.10 + FPC 2.6.2 / Windows7 64bits

 

TinyPortal © 2005-2018