<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 28 January 2017 at 13:10, Ralph Versteegen <span dir="ltr"><<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>We ought to support embedded codes in *all* visible strings. Conceivably even hero names! "${H0}'s dog". Most significantly, text slices should support them. Do you think anyone has ever displayed ${...} codes in slices? We could just add a backcompat bitset for it. Also, we should add a way to escape the ${...} codes; I was thinking of $${...} to display as ${...}. The rule could simply be "replace $${ with ${ and don't search the result for ${...} codes".  Then $${...} can be escaped to $$${...}, etc.<br><br></div>Also, I decided that it's best not to use ${...} codes for markup supported by printstr such as color and font. ${...} should be exclusively for inserting a string variable in the text, as in many programming languages. Instead I was thinking of using #{...}, or maybe quite different syntax which has (optional) closing tags, like $[col45]...$[/col], since closing tags really are needed (right now I'm using -1 to mean 'restore previous'). Other tag names could include colbg, pal, spc (no closing tag), font, indent, indentr, and even link=.<br></div></div></div></blockquote><div><br></div><div>Plus also no-argument $[b], $[i], $[h] tags, which switch to the bold/italic/highlight font.<br></div><div>Actually, maybe we can just use [b], [col45], etc, or <b>, <col45>... and add a backcompat bit to enable them, and use a $ prefix to escape them<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><br></div>Finally, I would like ${...} to also be interpreted directly by HSpeak to embed values in strings (use the name of some variable that's in-scope). It's the easiest way to build a string. You should still have a choice whether the codes are expanded immediately at point of use in the script, or left and expanded each tick that they are displayed (in a textslice or elsewhere), so that they can continually update. (Currently textboxes expand all codes when first displayed, which I would like to change to each-tick. A back-compat bitset will probably be needed) This choice could be made in the same way as Python 3.6 and FB, by adding a prefix to the string literal: FB has !"..." and Python 3.6 allows arbitrary embedded expressions like f"{name} said {getExpression(42)}".<br></div>An obvious choice might be to use a $ prefix, but maybe $"foo" looks too similar to $0="foo",<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 26 January 2017 at 10:38,  <span dir="ltr"><<a href="mailto:subversion@hamsterrepublic.com" target="_blank">subversion@hamsterrepublic.<wbr>com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">james<br>
2017-01-25 13:38:04 -0800 (Wed, 25 Jan 2017)<br>
89<br>
Run embedtext on map name when it is automatically displayed when you first enter a map.<br>
---<br>
U   wip/game.bas<br>
U   wip/whatsnew.txt<br>
______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.o<wbr>rg</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org<wbr>/listinfo.cgi/ohrrpgce-motherh<wbr>amster.org</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>