有个问题。在使用外部库时,Rebol2中是否存在与Red/System中相同的Rebol2?
如果c声明是:
void f (int* i);我将如何定义routine!?
f: make routine! [
"Does Something"
int [pointer! [integer!]]
return: [char!]
] lib "f"我看到http://rebol.com/docs/library.html#section-25了
“传递指针的外部库函数通常期望指针为char或void数据类型。目前,REBOL例程不支持void数据类型。在大多数情况下,您可以安全地传递char而不是void。对于返回值,请使用长而非空。”
不过,只是有点困惑。定义f例程的正确方法是什么?
发布于 2014-02-03 13:22:10
当链接状态
f: make routine! [
"Does Something"
pInt [char*]
return: [long]
] lib "f" 几年前为我工作过
https://stackoverflow.com/questions/21437001
复制相似问题