Squirrel

The programming language
Welcome to Squirrel Sign in | Join | Help
in Search

Printing output from Squirrel

Last post 05-06-2009, 7:41 PM by TriLogic. 0 replies.
Sort Posts: Previous Next
  •  05-06-2009, 7:41 PM 3205

    Printing output from Squirrel

    Well I was back to working on my C# embedding of Squirrel after many months and I just ran up against what I consider a rather serious design flaw.

    Here it is: typedef void (*SQPRINTFUNCTION)(HSQUIRRELVM,const SQChar * ,...);

    Maybe I'm over simplifying things but I think this is a design flaw because some langauges do not support the VARARGS capability of C/C++.  Why not simply allow embedders to set a buffer size and then have the print out simply invoke a function pointer that takes a single string argument that is the final result to be printed?  Or perhaps the print method could pass in the buffer and the length allowed.

     

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems