Call a foreign-language function: Difference between revisions
m
→{{header|FutureBasic}}
No edit summary |
|||
Line 880:
BeginCFunction
char *strdup(const char *src) {
char *dst = malloc(strlen (src) + 1); // Space for length plus
if (dst == NULL) return NULL; // No memory
strcpy(dst, src); // Copy the characters
Line 897:
Hello, World!
</pre>
=={{header|Go}}==
|