13 lines
375 B
Text
13 lines
375 B
Text
/* Use_another_language_to_call_a_function.wren */
|
|
|
|
class RCQuery {
|
|
// Both arguments are lists as we need pass by reference here
|
|
static query(Data, Length) {
|
|
var s = "Here am I"
|
|
var sc = s.count
|
|
if (sc > Length[0]) return 0 // buffer too small
|
|
for (i in 0...sc) Data[i] = s[i].bytes[0]
|
|
Length[0] = sc
|
|
return 1
|
|
}
|
|
}
|