Talk:Call a foreign-language function: Difference between revisions

From Rosetta Code
Content added Content deleted
Line 4: Line 4:


Not all standard-compliant C89 implementations will have strdup available. As long as we're using C as a universal intermediate, we should stick to something that's going to be present in all C89-compliant versions. Suggested fixes for the task? --[[User:Short Circuit|Michael Mol]] 20:08, 5 October 2010 (UTC)
Not all standard-compliant C89 implementations will have strdup available. As long as we're using C as a universal intermediate, we should stick to something that's going to be present in all C89-compliant versions. Suggested fixes for the task? --[[User:Short Circuit|Michael Mol]] 20:08, 5 October 2010 (UTC)

:What qualities do we want the function to have? rand() would be simple to use, but would not demonstrate argument passing. catan2() would demonstrate argument passing, but would not deal character data. qsort() would require a callback. Etc... --[[User:Rdm|Rdm]] 20:19, 5 October 2010 (UTC)

Revision as of 20:19, 5 October 2010

I've modified the task slightly (making it a bit less strict) as part of merging in the content that was in C FFI, as that was the same task by a different, weaker name and with slightly variant non-important conditions. --Donal Fellows 20:36, 17 August 2009 (UTC)

strdup is part of POSIX, not standard C.

Not all standard-compliant C89 implementations will have strdup available. As long as we're using C as a universal intermediate, we should stick to something that's going to be present in all C89-compliant versions. Suggested fixes for the task? --Michael Mol 20:08, 5 October 2010 (UTC)

What qualities do we want the function to have? rand() would be simple to use, but would not demonstrate argument passing. catan2() would demonstrate argument passing, but would not deal character data. qsort() would require a callback. Etc... --Rdm 20:19, 5 October 2010 (UTC)