User:Toancaro/List of utilities spells/Variables: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<noinclude><nowiki | <noinclude><nowiki/> | ||
{{Template:TranscludeableLST|variables}}<br/> | |||
{{Code|Variable list}} | |||
/>{{ | {{Template:TranscludeableLST|joinOR}}<br/> | ||
<code> | |||
{{((}}#arraydefine: joinORItems | a,b,c,d,e{{))}}<br/> | |||
{{((}}#vardefine: joinORPageSize | 1{{))}}<br/> | |||
{{((}}#vardefine: test | {{((}}#lst:User:Toancaro/List of utilities spells/Variables|joinOR{{))}}{{))}} | |||
Print: {{#var: test}}<br/> | |||
}} | |||
</code> | |||
/> | </noinclude><includeonly><section begin="joinOR" /><nowiki | ||
/> | |||
/>{{#arrayunion: joinORItems | {{#if: {{#arraysize:joinORItems}} | joinORItems | }} }}<nowiki | />{{#arrayunion: joinORItems | {{#if: {{#arraysize:joinORItems}} | joinORItems | }} }}<nowiki | ||
/>{{#vardefine: joinORPageSize | {{#varexists:joinORPageSize | {{#var:joinORPageSize}} | 25 }} }}<nowiki | />{{#vardefine: joinORPageSize | {{#varexists:joinORPageSize | {{#var:joinORPageSize}} | 25 }} }}<nowiki | ||
/>{{#vardefine: joinORResult | | />{{#vardefine: joinORResult | }}<nowiki | ||
/>{{#loop: i | 0 | | />{{#loop: i | 0 | {{#expr: ceil({{#arraysize:joinORItems}} / {{#var:joinORPageSize}})}} | <nowiki | ||
/>{{#arrayslice: itemSliced | | />{{#arrayslice: itemSliced | joinORItems | {{#expr: {{#var: i}} * {{#var:joinORPageSize}} }} | {{#var:joinORPageSize}}}}<nowiki | ||
/>{{#vardefine: itemsOR | {{#arrayprint: itemSliced | OR | @ | name = "@" }}}}<nowiki | />{{#vardefine: itemsOR | {{#arrayprint: itemSliced | OR | @ | name = "@" }}}}<nowiki | ||
/>{{#vardefine: itemsORNormalized | {{#replace:{{#var: itemsOR}} | OR | <nowiki/> <nowiki/>OR<nowiki/> <nowiki/>}}}}<nowiki | />{{#vardefine: itemsORNormalized | {{#replace:{{#var: itemsOR}} | OR | <nowiki/> <nowiki/>OR<nowiki/> <nowiki/>}}}}<nowiki | ||
/>{{#vardefine: joinORResult | {{#if: {{#var:joinORResult}} | {{#var:joinORResult}} OR {{#var:itemsORNormalized}} | {{#var:itemsORNormalized}} }} }}<nowiki | |||
/>}}<nowiki | />}}<nowiki | ||
/>{{# | />{{#var: joinORResult}}<nowiki | ||
/><section end="joinOR" /><nowiki | /><section end="joinOR" /><nowiki | ||
Revision as of 17:43, 15 January 2024
The following section can be transcluded into other pages with {{#lst:User:Toancaro/List of utilities spells/Variables|variables}}
.
Variable list
The following section can be transcluded into other pages with {{#lst:User:Toancaro/List of utilities spells/Variables|joinOR}}
.
{{#arraydefine: joinORItems | a,b,c,d,e}}
{{#vardefine: joinORPageSize | 1}}
{{#vardefine: test | {{#lst:User:Toancaro/List of utilities spells/Variables|joinOR}}}}
Print:
}}