type matching

Monkey Forums/Monkey Programming/type matching

Emil_halim(Posted 2014) [#1]
Hi all

i have a c function like this
 int MyFun(byte* src , byte* dest)

so how can i extern it to monkey lang ?


dragon(Posted 2014) [#2]
Import "nativ.cpp"
Extern
Function MyFun:Int (src:Byte[], dest:Byte[]) = "MyFun"
Public



i am only unsure about type for src, dest
you can use string, i think... or byte[]


Emil_halim(Posted 2014) [#3]
thanks dragon,

does i have to put the last term "MyFun" , i see it is the same as the CPP function name?