Recent

Author Topic: Can a normal function/procedure be aliased ?  (Read 788 times)

440bx

  • Hero Member
  • *****
  • Posts: 935
Re: Can a normal function/procedure be aliased ?
« Reply #15 on: May 07, 2019, 12:26:45 pm »
If it isn't imported from a library why would it be in the Import and Export tables?
Only those with export modifier or in the exports section are put into the Export table and only those with external <LIBRARY> or external <LIBRARY> name <FUNC> are part of the Import table (and the suggestion by marcov is external name <FUNC> which has a small, but in this case significant different meaning due to the missing library name).
I have no doubt you know the internals of the FPC compiler better than I do, therefore, I will take your word for it. The presence of the keyword "external" gave me the impression that it could end up in the exports and imports tables.  Your point that without the keyword "exports" that doesn't happen makes sense. 

ETA:

On the other hand, doesn't it end up creating symbols for each alias in the DWARF/Stabs debugging symbol tables ?



« Last Edit: May 07, 2019, 12:28:59 pm by 440bx »
using FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 8163
Re: Can a normal function/procedure be aliased ?
« Reply #16 on: May 07, 2019, 03:57:31 pm »
On the other hand, doesn't it end up creating symbols for each alias in the DWARF/Stabs debugging symbol tables ?
Yes. But that is probably what you want:: the debugger making a choice between any of whatever you aliased.... That's commonly known as DWIM and not yet achieved by human kind. ::) ::) ::) ::)

YOU should think first, THEN - you are making some progress - let the compiler think. This will stay so for a very, very long time...(In my opinion... O:-) )
« Last Edit: May 07, 2019, 04:02:29 pm by Thaddy »
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

440bx

  • Hero Member
  • *****
  • Posts: 935
Re: Can a normal function/procedure be aliased ?
« Reply #17 on: May 07, 2019, 04:46:38 pm »
YOU should think first,
You occasionally manage to have such profound insights as to reach the obvious.  Impressive!.

let the compiler think. This will stay so for a very, very long time...(In my opinion... O:-) )
that sounds right... waiting for the compiler to think probably involves a "very, very long time...".  Very insightful of you.


using FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.