delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/09/03:23:28

From: bdarnell AT vnet DOT net (Ben Darnell)
Newsgroups: comp.lang.pascal.misc,comp.os.msdos.djgpp
Subject: Re: A couple quick questions invloving GNU Pascal: Books, Accessing memory and Ports
Date: Wed, 08 Jan 1997 23:19:15 GMT
Organization: Vnet Internet Access, Inc.
Lines: 34
Message-ID: <5b1a1l$abf@ralph.vnet.net>
References: <5as7s9$8m AT acs1 DOT star DOT net> <32D2F879 DOT 4209 AT cam DOT org>
NNTP-Posting-Host: vts-char6-s11.vnet.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Tudor <tudor AT cam DOT org> was overheard mumbling incoherently about Re: A
couple quick questions invloving GNU Pascal: Books, Accessing memory
and Ports:

>I have almost the same problem.GNU pascal is supposed to be compatible
>with Turbo pascal;
>What happens if I say 
>....
>program foo;
>uses crt;  <---legal in TP & BP ;GNU ???
>.....

GPC supports the uses statement, but AFAIK, the crt unit hasn't been
ported.

>and another thingy: TP & BP don't make OBJ's,the linking is automatic.Is
>this a feature of Pascal or just the borland products?I mean,will GNU
>pascal produce any .O's ?Can I link GNU Pascal code in GCC progs?
>Just curios.. 

GPC works just like gcc.  You can do
gpc foo.pas -o foo.exe  -> produces foo.exe, no .o
gpc -c foo.pas          -> produces foo.o

You can call c functions from pascal, as long as you give it a
prototype:
function my_c_func(x:integer):integer;c;
I haven't tried the other way around.
     __                         __
 /> /_ /| /   /\  /|  />  /| / /_ /  /
/> /_ / |/   /_/ /-| / \ / |/ /_ /_ /_
http://users.vnet.net/bdarnell
bdarnell AT vnet DOT net

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019