Re: using C routines in pascal
Marinier, M. Claude, G. wrote:
Would it be sufficient to put function genbet(x,y:shortreal):shortreal;C; in the calling program? Is it necessary to have the wrapper unit? If yes, why is a wrapper needed?
The advantage of a "wrapper" unit is, if you have (or plan to have) several programs using the library, you'll have only one place which depends on the C code (i.e., only one place to change if the C interface changes). (And it's better modularization, anyway.) The run-time efficiency will be the same for a wrapper unit with external declarations (unlike wrapper routines which suffer from a small overhead -- it depends on the routines if the overhead is relevant or neglectible). Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/ GPC To-Do list, latest features, fixed bugs: http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
Hi, After building the 20000705 release on Solaris 2.7 with gcc 2.95.2, I do a gpc --version and I get 2.95.2 19991024 (release) However, I can find 20000705 with strings /usr/local/bin/gpc | grep 2000 -- Claude Marinier, Information Technology Group claude.marinier@dreo.dnd.ca Defence Research Establishment Ottawa (DREO) (613) 998-4901 FAX 998-2675 3701 Carling Avenue, Ottawa, Ontario K1A 0Z4 http://www.dreo.dnd.ca
Marinier, M. Claude, G. wrote:
gpc --version and I get 2.95.2 19991024 (release)
Use `gpc -v': esmeralda/home/peter> gpc -v Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.1/specs gpc version 20000704, based on 2.95.1 19990816 (release) You have new mail in /var/spool/mail/peter esmeralda/home/peter> (If you do not get the "new mail" message, that's okay and it does not mean anything about your GPC installation. If, OTOH, I did not get the "new mail" message, I'd know that something really strange has probably happened.;-) Peter -- http://home.pages.de/~Peter.Gerwinski/ - G-N-U GmbH: http://www.g-n-u.de Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-20000705 GnuPG key fingerprint: 9E7C 0FC4 8A62 5536 1730 A932 9834 65DB 2143 9422 keys: http://www.gerwinski.de/pubkeys/ - AntiSpam: http://spam.abuse.net
participants (3)
-
claude.marinier@dreo.dnd.ca -
Frank Heckenbach -
Peter Gerwinski