| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <title>Embeddable</title> |
| <link rel="stylesheet" href="style.css"> |
| </head> |
| |
| <body> |
| <? prevnext "<h1>Embeddable</h1>" ?> |
| |
| This is a bit more complicated, and requires some knowledge of C, |
| but it's very powerful - trust me! |
| <p> |
| Let's create a Tcl command: |
| |
| <pre> |
| <B><FONT COLOR="#228B22">int</FONT></B> <B><FONT COLOR="#0000FF">Getpw_Init</FONT></B>(Tcl_Interp *interp) |
| { |
| Tcl_CreateObjCommand(interp, |
| <B><FONT COLOR="#BC8F8F">"getpw"</FONT></B>, |
| GetPW, |
| NULL, |
| (Tcl_CmdDeleteProc *)NULL); |
| <B><FONT COLOR="#A020F0">return</FONT></B> TCL_OK; |
| } |
| </PRE> |
| </pre> |
| |
| |
| </body> |
| </html> |