Menu

#14 Extra spaces are not excluded from strings during ZIL -> ZAP conversion

0.5
wont-fix
nobody
None
5
2015-02-22
2015-02-18
A.P.$lasH
No

Extra spaces are not excluded from strings during ZIL -> ZAP conversion (see attached screenshot).

Tested on cloak_plus.zil from Sample folder.

Version 0.4 of zilf.exe doesn't have this bug.

1 Attachments

Discussion

  • A.P.$lasH

    A.P.$lasH - 2015-02-19

    I guess, it has something to do with a new feature, introduced in version 0.5:

    "Changed whitespace removal behavior when strings contain embedded newlines."

    So I'm a bit confused as to whether it is a bug or a feature. And if it's really a feature, then how should we deal with long strings from now on?

     
  • Tara McGrew

    Tara McGrew - 2015-02-19

    Yes, the old behavior was a bug, and 0.5 fixed the bug. Looks like I forgot to update the samples.

     
  • A.P.$lasH

    A.P.$lasH - 2015-02-21

    Please excuse my persistence, but what should I change in, say, cloak_plus.zil, to compile it properly (without extra blanks)?

     
  • Tara McGrew

    Tara McGrew - 2015-02-21

    I think you just need to delete the spaces after newlines in a multiline string. For example, in the screenshot there are too many spaces between "the" and "bright", and in the source code, there's a newline and some spaces between those words. Keep the newline (which is translated to a single space) and delete the spaces.

     
  • A.P.$lasH

    A.P.$lasH - 2015-02-21

    You mean, there is no way to indent strings now?

    <ROOM FOYER
    (DESC "Foyer of the Opera House")
    --------(IN ROOMS)
    --------(LDESC "You are standing in a spacious hall, splendidly
    decorated in red and gold, with glittering chandeliers
    overhead. The entrance from the street is to the north,
    and there are doorways south and west.")
    --------(SOUTH TO BAR)

    Looks exactly like original Zork MDL source.

    This is rather sad. OK, I get it.

    Thank you for a quick reply.

     

    Last edit: A.P.$lasH 2015-02-21
  • Tara McGrew

    Tara McGrew - 2015-02-22

    Correct. You may be able to write a macro to remove the spaces at compile time, though.

     
  • Tara McGrew

    Tara McGrew - 2015-02-22
    • status: open --> wont-fix
     

Log in to post a comment.