From: AndrewJ Newsgroups: comp.os.msdos.djgpp Subject: Re: pass C source to program binary? Message-ID: References: <200009141606 DOT LAA19381 AT darwin DOT sfbr DOT org> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 18 Date: Thu, 14 Sep 2000 17:15:12 GMT NNTP-Posting-Host: 24.42.120.18 X-Complaints-To: abuse AT home DOT net X-Trace: news3.rdc1.on.home.com 968951712 24.42.120.18 (Thu, 14 Sep 2000 10:15:12 PDT) NNTP-Posting-Date: Thu, 14 Sep 2000 10:15:12 PDT Organization: Excite AT Home - The Leader in Broadband To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Thu, 14 Sep 2000 11:07:42 -0500 (CDT), Jeff Williams wrote: >Is there a obvious technique for passing the source code for a small C >function (e.g., `for (i=1;i<=N;i++) y[i]=foo(x[i]);'), which might be in >a file or passed via command-line, to an already-compiled C program and >have that program be able to interpret and use the function internally? > >I'm looking for a way to give a program some extra flexibility >without requiring the user to write various custom C functions and >then re-compile/re-link with the main program. Only if you want to write your own "on-the-fly" interpreter yourself. Think for a moment... How do you get programs from C? You compile them! So, how can the program you've made compile source code when it itself is not the compiler? -- AndrewJ