A simple query about printing

Jonathan O
27 Aug 2020, 18:47

I am using theif command to describe a notice, and want it to leave gaps when letters are removed (eg the original message is 27 ROZYLIM, and when the O is removed it should read 27 R ZYLIM. How do I get the conditional sections to print a space? {if letter O.take: } just prints nothing at all. I've tried " ", ' ' and \, and none of these work (in the web version of Quest). Is there a solution to this?


mrangel
27 Aug 2020, 19:43

I think you want   - non-breaking space.

I'm not sure why that wouldn't work with just a space, though. I can't see any unnecessary trimming in the text processor functions.

If you have the capability to remove 2 adjacent letters, you might also want to put <pre> before the sign and </pre> after, which prevents multiple spaces being collapsed into a single space.

You could also use <img style="width: 1em"/> which generates a blank image the same width as a letter m.


Jonathan O
28 Aug 2020, 08:34

Thanks - the nbsp works fine. Is there a list of special characters anywhere that I can refer to?


Doctor Agon
28 Aug 2020, 22:45

If you wanted to print more than one space, there is also a function Spaces(x), where x is the number of spaces.