With Glulx, it’s possible that a function is called while decoding a string.
Section 1.3.4 of the spec says that when a function called while decoding a string returns, string decoding resumes.
What happens if that function has changed the IO system with @setiosys? Does “resumes” means that the initial IO system (the one when we started decoding the string) is still used, and the new one IO system will take effect on the next @streamstr? Or should we use the new IO system right away?
(While I’m at it, are the call stubs’ DestType 10 to 14 in hex or decimal? I guess hex as every other numbers in the spec, but just to be sure.)
Thanks! Next time I’ll look into glulxercise before asking a question.
I have to say I find this whole string-decoding business quite convoluted, and I don’t see yet when it can be useful to call a function while decoding a string. But I guess there’s a reason.
Actually, can Inform produce a compressed string with function calls? (Besides the author handwriting it.)
I just looked in one of my Inform 7 projects, and the initial decoding table only contained 0x00 (branch), 0x01 (terminator) and 0x03 (single character) nodes.
That makes sense, I totally forgot about dynamic strings! Thanks again.
OK, so one (hopefully) last question. When the IO system is set to null, do we skip the entire decoding process (i.e. jump directly to the terminator node), or do we only ignore the printing nodes (type 2 to 5) but still process the indirect calls?
(Or to put it in another way: are function calls during string decoding considered as output?)