Posted to tcl by dram at Sun Oct 22 11:55:06 GMT 2017view raw

  1. #include <tcl.h>
  2.  
  3. int main()
  4. {
  5. Tcl_Interp *tcl = Tcl_CreateInterp();
  6.  
  7. Tcl_Channel channel = Tcl_GetStdChannel(TCL_STDOUT);
  8.  
  9. Tcl_WriteChars(channel, "hello\n", -1);
  10. Tcl_WriteChars(channel, "`}\n", -1);
  11. Tcl_WriteRaw(channel, "`}\n", -1);
  12.  
  13. Tcl_Close(tcl, channel);
  14.  
  15. Tcl_DeleteInterp(tcl);
  16.  
  17. return 0;
  18. }
  19.  
  20.  
  21. Output:
  22.  
  23. hello
  24. ??
  25. `}