<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[UDL: Overloaded folding close keywords]]></title><description><![CDATA[<p dir="auto">I’ve got a bit of a curly one here for specifying a UDL that I could do with some help with.</p>
<p dir="auto">Here’s what I’ve got so far:<br />
<img src="https://camo.nodebb.org/7a5fa118e230ae959b963e0bbd6b6a82771d3d87?url=https%3A%2F%2Fi.imgur.com%2FTryEoxQ.png" alt="Imgur" class=" img-fluid img-markdown" /></p>
<p dir="auto">The problem is the keyword “END” is used to finish an IF … THEN block, but is also used in “END SELECT” for a “SELECT CASE” block.</p>
<p dir="auto">As you can see, lines 12, 13 &amp; 14 get treated as “END SELECT” instead of it being “END” finishing the IF above it and “SELECT CASE” starting a new block.</p>
<p dir="auto">Is there a subtle way around this? Or have reached the limit of what can be done with UDL?</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/17073/udl-overloaded-folding-close-keywords</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 00:04:01 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/17073.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 08 Feb 2019 07:03:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to UDL: Overloaded folding close keywords on Sat, 09 Feb 2019 17:41:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rossjparker" aria-label="Profile: rossjparker">@<bdi>rossjparker</bdi></a></p>
<blockquote>
<p dir="auto">But I did find what appears to be the perfect solution by trial and error. Use single quote characters (’) to specify multi word open/closing folding in markers instead of double quotes (").</p>
</blockquote>
<p dir="auto">nice find (i’ve just tried out your solution) and <strong>very</strong> embarrasing that i did not try that (<code>'</code>) out beforehand  🤭</p>
<p dir="auto">thank you for your own, <strong>working</strong> solution and for sharing. 👍<br />
if you like, stick around here in the future, either for casual reading, or to participate on anything of interest to you. you are always welcome.</p>
<p dir="auto">greetings, meta chuh</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39514</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39514</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Sat, 09 Feb 2019 17:41:51 GMT</pubDate></item><item><title><![CDATA[Reply to UDL: Overloaded folding close keywords on Sat, 09 Feb 2019 01:03:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/meta-chuh" aria-label="Profile: Meta-Chuh">@<bdi>Meta-Chuh</bdi></a> - not a bad compromise until I tried it with a real source file with lots of functions. Everything after the END SELECT starts to get misinterpreted as the parser is out of sync. Functions that follow start to get messed up too.</p>
<p dir="auto">But I did find what appears to be the perfect solution by trial and error. Use single quote characters (') to specify multi word open/closing folding in markers instead of double quotes ("). Using single quotes appears to still allow any amount of white space between the words <strong>except</strong> new lines - i.e. the two words must be on the same line.</p>
<p dir="auto"><img src="https://camo.nodebb.org/1290821bcf9d1a2a526e9b14deef9b260122c433?url=https%3A%2F%2Fi.imgur.com%2Fp0U2MZ1.png" alt="Imgur" class=" img-fluid img-markdown" /></p>
<p dir="auto">I know the language definition is terrible. But this language is very old - it dates back to the pre-internet times you were reminiscing about earlier <a class="plugin-mentions-user plugin-mentions-a" href="/user/meta-chuh" aria-label="Profile: Meta-Chuh">@<bdi>Meta-Chuh</bdi></a>! :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39496</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39496</guid><dc:creator><![CDATA[rossjparker]]></dc:creator><pubDate>Sat, 09 Feb 2019 01:03:34 GMT</pubDate></item><item><title><![CDATA[Reply to UDL: Overloaded folding close keywords on Sat, 09 Feb 2019 00:59:32 GMT]]></title><description><![CDATA[<p dir="auto">A hack would be to tweak the end folding statement and using an unique comment at the end.<br />
Of course this means that you have to type this in addition but … well … it’s a dirty hack.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39495</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39495</guid><dc:creator><![CDATA[Eko palypse]]></dc:creator><pubDate>Sat, 09 Feb 2019 00:59:32 GMT</pubDate></item><item><title><![CDATA[Reply to UDL: Overloaded folding close keywords on Sat, 09 Feb 2019 00:23:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a></p>
<blockquote>
<p dir="auto">The best I’ve found out, is to, simply, type in END in the Close zone. The drawback is that the word SELECT in END SELECT, is not highlighted anymore ;-))</p>
</blockquote>
<p dir="auto">yes, your solution is also the best thing i could find so far.</p>
<p dir="auto">the highlighting of <code>SELECT</code> would not be a problem, as we can set that as a keyword with the same colour (screenshot below).<br />
the bigger issue is, that the “SELECT” after the “END” of “END SELECT” opens another fold, but never gets a belonging closing end.<br />
it works, but it looks a little awkward, as the function fold will overshoot the document.</p>
<p dir="auto">what do you say, <a class="plugin-mentions-user plugin-mentions-a" href="/user/rossjparker" aria-label="Profile: rossjparker">@<bdi>rossjparker</bdi></a> ?<br />
folding seems to work using this workaround and the given sample, but not perfect.</p>
<p dir="auto"><img src="https://camo.nodebb.org/8de445acb57461a31f468514fcfd90c99b70eca4?url=https%3A%2F%2Fi.imgur.com%2FkCLXEPz.png" alt="Imgur" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/39494</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39494</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Sat, 09 Feb 2019 00:23:06 GMT</pubDate></item><item><title><![CDATA[Reply to UDL: Overloaded folding close keywords on Fri, 08 Feb 2019 23:49:14 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the welcome <a class="plugin-mentions-user plugin-mentions-a" href="/user/meta-chuh" aria-label="Profile: Meta-Chuh">@<bdi>Meta-Chuh</bdi></a> !</p>
<p dir="auto">I had no idea this was such an active community! Good on you all. Thanks for taking the time to look at my problem.</p>
<p dir="auto">As suggested by <a class="plugin-mentions-user plugin-mentions-a" href="/user/mapje71" aria-label="Profile: MAPJe71">@<bdi>MAPJe71</bdi></a> (and sorry I did not think of it up front - but at least I figured out how to embed an externally hosted image! :-), here is the source snippet I’m playing with for those wishing to play along:</p>
<pre><code>INT FUNCTION _KRN_Alarm_ClearSelection(INT iDspType = -1, INT iMonitor = -1)

	INT		iError = -1;
	INT		iFormID = -1;

	IF iMonitor = -1 THEN
		iMonitor = KRN_MM_GetMonitor();
	END

	IF iDspType = -1 THEN
		iDspType = miAlarmDsp[iMonitor];
	END

	SELECT CASE iDspType
	CASE ALM_CURRENT
		iFormID = mhCurrentForm[iMonitor];
	CASE ALM_HISTORY
		iFormID = mhHistoryForm[iMonitor];
	CASE ALM_SHELVED
		iFormID = mhShelvedForm[iMonitor];
	END SELECT

	IF iFormID &lt;&gt; -1 THEN
		iError = KRN_DG_FormClearSelection(mobjAlarmDataGrid, iFormID);
	END

	RETURN iError;
END
</code></pre>
<p dir="auto">And here is the corresponding UDL v2.1 XML export:</p>
<pre><code>&lt;NotepadPlus&gt;
	&lt;UserLang name="CiCode" ext="ci" udlVersion="2.1"&gt;
		&lt;Settings&gt;
			&lt;Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="yes" forcePureLC="0" decimalSeparator="0" /&gt;
			&lt;Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /&gt;
		&lt;/Settings&gt;
		&lt;KeywordLists&gt;
			&lt;Keywords name="Comments"&gt;03/* 04*/ 00! 00// 01 02&lt;/Keywords&gt;
			&lt;Keywords name="Numbers, prefix1"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Numbers, prefix2"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Numbers, extras1"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Numbers, extras2"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Numbers, suffix1"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Numbers, suffix2"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Numbers, range"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Operators1"&gt;( ) [ ] , = ;&lt;/Keywords&gt;
			&lt;Keywords name="Operators2"&gt;AND OR NOT&lt;/Keywords&gt;
			&lt;Keywords name="Folders in code1, open"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Folders in code1, middle"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Folders in code1, close"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Folders in code2, open"&gt;IF FUNCTION WHILE FOR &amp;quot;SELECT CASE&amp;quot;&lt;/Keywords&gt;
			&lt;Keywords name="Folders in code2, middle"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Folders in code2, close"&gt;END &amp;quot;END SELECT&amp;quot;&lt;/Keywords&gt;
			&lt;Keywords name="Folders in comment, open"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Folders in comment, middle"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Folders in comment, close"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Keywords1"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Keywords2"&gt;THEN DO TO RETURN CASE&lt;/Keywords&gt;
			&lt;Keywords name="Keywords3"&gt;INT REAL STRING OBJECT GLOBAL&lt;/Keywords&gt;
			&lt;Keywords name="Keywords4"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Keywords5"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Keywords6"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Keywords7"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Keywords8"&gt;&lt;/Keywords&gt;
			&lt;Keywords name="Delimiters"&gt;00&amp;quot; 01^ 02&amp;quot; 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23&lt;/Keywords&gt;
		&lt;/KeywordLists&gt;
		&lt;Styles&gt;
			&lt;WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="Consolas" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="COMMENTS" fgColor="2E369C" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="LINE COMMENTS" fgColor="2E369C" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" /&gt;
			&lt;WordsStyle name="NUMBERS" fgColor="FF00FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /&gt;
			&lt;WordsStyle name="KEYWORDS1" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" /&gt;
			&lt;WordsStyle name="KEYWORDS2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /&gt;
			&lt;WordsStyle name="KEYWORDS3" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /&gt;
			&lt;WordsStyle name="KEYWORDS4" fgColor="0000A0" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" /&gt;
			&lt;WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="OPERATORS" fgColor="EA0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /&gt;
			&lt;WordsStyle name="FOLDER IN CODE1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /&gt;
			&lt;WordsStyle name="FOLDER IN CODE2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /&gt;
			&lt;WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="DELIMITERS1" fgColor="008040" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
			&lt;WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /&gt;
		&lt;/Styles&gt;
	&lt;/UserLang&gt;
&lt;/NotepadPlus&gt;
</code></pre>
<p dir="auto">In this language (CiCode), you can comment out an entire line by starting it with a ‘!’. If I comment out the blank line between the END and the SELECT, it immediately fixes the problem. And in fact this is the temporary work-around I am using currently.</p>
<p dir="auto">Thanks once again for your interest!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39493</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39493</guid><dc:creator><![CDATA[rossjparker]]></dc:creator><pubDate>Fri, 08 Feb 2019 23:49:14 GMT</pubDate></item><item><title><![CDATA[Reply to UDL: Overloaded folding close keywords on Fri, 08 Feb 2019 22:56:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mapje71" aria-label="Profile: MAPJe71">@<bdi>MAPJe71</bdi></a></p>
<p dir="auto">remember the good old times, without any internet, public domain disks, nor bbs modems, when many of us bought computer magazines and started typing the published program listings into our home computers, for nights and nights.</p>
<p dir="auto">(it used to be an extra challenging fun in the pre-checksum aera 😉)</p>
<p dir="auto">maybe this just kicks in that same retro style motivation, to actually type all that stuff down … and maybe … just maybe, the op knew all that in advance, and just wanted to surprise us with a gift from our childhood 😂😂😂</p>
<p dir="auto">btw: just kidding, welcome to the notepad++ community,  <a class="plugin-mentions-user plugin-mentions-a" href="/user/rossjparker" aria-label="Profile: rossjparker">@<bdi>rossjparker</bdi></a> 👍</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39492</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39492</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Fri, 08 Feb 2019 22:56:21 GMT</pubDate></item><item><title><![CDATA[Reply to UDL: Overloaded folding close keywords on Fri, 08 Feb 2019 21:20:18 GMT]]></title><description><![CDATA[<p dir="auto">Including the example source file and the export file of the UDL (or at least links to them) saves any (potential) helper from having to type the code and UDL entries.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39487</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39487</guid><dc:creator><![CDATA[MAPJe71]]></dc:creator><pubDate>Fri, 08 Feb 2019 21:20:18 GMT</pubDate></item><item><title><![CDATA[Reply to UDL: Overloaded folding close keywords on Fri, 08 Feb 2019 19:35:09 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/rossjparker" aria-label="Profile: rossjparker">@<bdi>rossjparker</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/jim-dailey" aria-label="Profile: jim-dailey">@<bdi>jim-dailey</bdi></a> and <strong>All</strong>,</p>
<p dir="auto"><strong>Jim</strong>, did you really verify your <strong>assumption</strong>, re-creating the <strong>code</strong> of the picture, in a new tab ?</p>
<p dir="auto">It was my <strong>first</strong> guess too, but, unfortunately, it does <strong>not</strong> work :-((</p>
<p dir="auto">Trying with <strong><code>END SELECT</code></strong>, only, in the <strong><code>Close</code></strong> part is also <strong>useless</strong> ! In that case, of course, the <strong>end</strong> of the <strong><code>FUNCTION</code></strong> area occurs on the <strong><code>END SELECT</code></strong> of the <strong>SELECT CASE</strong> block</p>
<p dir="auto">The best I’ve found out, is to, simply, type in <strong><code>END</code></strong> in the <strong><code>Close</code></strong> zone. The <strong>drawback</strong> is that the word <strong>SELECT</strong> in <strong>END SELECT</strong>, is <strong>not</strong> highlighted anymore ;-))</p>
<p dir="auto">However, I’m not a <strong>pro</strong> about <strong>UDL</strong> languages and I haven’t <strong>fully</strong> study the <strong><code>UDL</code></strong> documentation, yet ( See below ) :</p>
<p dir="auto"><a href="https://ivan-radic.github.io/udl-documentation/" rel="nofollow ugc">https://ivan-radic.github.io/udl-documentation/</a></p>
<p dir="auto">I do hope that I did <strong>miss</strong> something obvious ;-))</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39484</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39484</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Fri, 08 Feb 2019 19:35:09 GMT</pubDate></item><item><title><![CDATA[Reply to UDL: Overloaded folding close keywords on Fri, 08 Feb 2019 16:16:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rossjparker" aria-label="Profile: rossjparker">@<bdi>rossjparker</bdi></a></p>
<p dir="auto">I believe you need a Close for every Open. I think the END SELECT is ending the FUNCTION block.</p>
<p dir="auto">Try <code>END END END END "END SELECT"</code> in your Close box.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39479</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39479</guid><dc:creator><![CDATA[Jim Dailey]]></dc:creator><pubDate>Fri, 08 Feb 2019 16:16:04 GMT</pubDate></item></channel></rss>