ID:132319
 
Is there a hard limit on the size of the string returned by a call()() to an external library? I'm moving around large grids of numbers (>100KB) and BYOND seems to crash if I try to return it directly (currently working around this by writing it to a file).

If such a limit does exist, could it be a world-defined variable (e.g. world/call_buffer or some such)?
There is a limit, my random guess would be 65k. Just try to return different sizes to figure out the limit.
I believe the BYOND string format is a Pascal-style string with a two-byte length value - that is, strings longer than 65536 bytes (64 KiB) aren't possible.

This likely isn't at all changeable without significant work on BYOND internals.
In response to Jp
That's fine for my purposes now since I'm putting more of the computation into the external library. A page of data type info (max string length, integer length, floating point precision etc) would be quite handy to have in the reference IMHO.
I've had it do daft things like snap at 10k length before, but it's always been tricky to nail. I think a "try it and see" approach applies here.
In response to Jp
Jp wrote:
I believe the BYOND string format is a Pascal-style string with a two-byte length value - that is, strings longer than 65536 bytes (64 KiB) aren't possible.

That is incorrect. BYOND uses null-terminated strings.