@Stefan_Salewski Excellent, it works with string: import iup discard iup.open(nil,nil) var str : string = newString(1024) i: int = 0 for ch in "../docs/*.txt": str[i] = ch i += 1 echo iup.getFile(str) echo str iup.close() Run
But even this works with string like this: import iup discard iup.open(nil,nil) var str : string = "../docs/*.txt" echo iup.getFile(str) echo str iup.close() Run the only thing is it cuts the reply to len("../docs/*.txt")! But why doesn't it work with cstring??? It's weird to see a signature `proc getFile*(arq: cstring): cint`, then when using cstring it doesn't work while it works with string. I know the whole concept is a bad way of passing data around, but still, it's very confusing, it should also work with cstring!