home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!think.com!ames!tulane!cpu.com!cpu.com!GWLESTER
- From: gwlester@cpu.com (Gerald W. Lester)
- Subject: Re: Parsing "C" code in TCL ???
- Nntp-Posting-Host: captainhook.cpu.com
- References: <37572@uflorida.cis.ufl.edu>
- Sender: usenet@cpu.com (Usenet administrator)
- Organization: Computerized Processes Unlimited, Metairie, LA, (504)-889-2784
- Date: Tue, 10 Nov 1992 18:34:16 GMT
- Message-ID: <1992Nov10.183416.10100@cpu.com>
- Reply-To: gwlester@cpu.com
- Lines: 36
-
- In article <37572@uflorida.cis.ufl.edu>, palkar@reef.cis.ufl.edu (MMP) writes:
- >Hi,
- >
- >I am new for this language. I have learned the TCL syntax and I am able to use
- >the library to write small programmes in Tk. Now I plan to write an user
- >interface for a bunch of C codes that I have written. However I am not able get
- >all the necessary information on how I should proceed. I have read the FAQ ,
- >talk series, man pages and the first part of the book.
- >
- >For example : I have the following sample code which I have to use in Tcl as a
- >command that I can use in Tk.
- >
- >void trial (int K, int M)
- >{
- >if(M==1){
- > for (i=0;i<K;i++)
- > printf("%d \n",K);
- >}
- >else {
- > for (i=0;i<K;i++)
- > printf("%d \n",K*(K-1));
- >}
- >}
- >How do I convert TRIAL in a Tcl command. Do I have recompile everything (Tcl );
- >Please Help.
- >
- >MALHAR
- >
- >ps : This just a sample code. I think I can do that in Tcl/Tk. BUT I want to
- >use "C".
-
-
- *PLEASE* put in line breaks somewhere between column 75 and 79!!!
-
- Read the man page that comes with tcl on CrtCommand.
-
-