Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.pascal.borland    |    Borland Pascal was actually pretty neat    |    2,978 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,548 of 2,978    |
|    Rudolf Wiesendanger to sm7040@hotmail.com    |
|    Re: Point to an external function?    |
|    01 May 05 18:05:52    |
   
   From: ruediw@lycos.com   
      
   "Sm704" wrote in   
   news:1114900153.038648.282270@z14g2000cwz.googlegroups.com:   
      
   > I'm editing a Unit file by trying to convert the source into English   
   > (Everything is in German). There is an external function in a .obj file   
   > that I want my English-named function to point to. I don't have the   
   > assembler source, so I can't modify the file directly.   
   >   
   >   
   > This is how the functions are declared in the implementation section of   
   > the Unit:   
   >   
   >   
   > (* German Function "ReceiveBuffer" *)   
   >   
   > function EmpfangenSiePuffer(number : word) : char; external;   
   >   
   >   
   >   
   > (* My English translated function of the above. *)   
   >   
   > function ReceiveBuffer(number : word) : char;   
   > begin   
   > ReceiveBuffer := EmpfangenSiePuffer(number);   
   > end;   
   >   
   >   
   > See what I'm trying to do? When I call the English version of   
   > ReceiveBuffer() in my program, I want that to call the German version   
   > which is external. I tried using the example as posted above, but it's   
   > not working correctly. Do I need to use a pointer? Could someone please   
   > post an example of how I may be able to do what I want?   
   >   
   >   
   > Thank you!   
   >   
      
   If You don't have the sources of the .obj-files You cann't change the   
   name of the procedures and funtions.If You cann't work with the german   
   names, then make a **new** unit- don't change the original (german).   
      
   In the interface section You define the translated names.In the   
   implementation section You call the original (german) functions.   
      
   Example:   
      
   Unit   
    EngFunc;   
      
   Interface   
      
   function ReceiveBuffer(number : word) : char;   
      
   .....   
      
   Implementation   
      
   Uses   
    GermFunc;   
      
   function ReceiveBuffer(number : word) : char;   
   begin   
    ReceiveBuffer := EmpfangenSiePuffer(number);   
   end;   
      
   End.   
      
   HTH   
   Rudolf   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca