Use another language to call a function: Difference between revisions
Content deleted Content added
No edit summary |
→{{header|Go}}: removed comment no longer applicable with updated task code |
||
Line 121: | Line 121: | ||
if (0 == Query (Buffer, &Size)) |
if (0 == Query (Buffer, &Size)) |
||
...</lang> |
...</lang> |
||
The biggest change is that I renamed main, since it is no longer a C main function. Another small change is that the extern declaration is replaced by an include. The included file is generated by cgo and contains an equivalent extern declaration |
The biggest change is that I renamed main, since it is no longer a C main function. Another small change is that the extern declaration is replaced by an include. The included file is generated by cgo and contains an equivalent extern declaration. |
||
In the Go code, below, you see that all main does is call C.Run. The C code is then in the driver's seat. |
In the Go code, below, you see that all main does is call C.Run. The C code is then in the driver's seat. |