ArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2010-03-09T01:03:53+02:00 https://brainmodular.org/forums/app.php/feed/topic/1846 2010-03-09T01:03:53+02:00 2010-03-09T01:03:53+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=12433#p12433 <![CDATA[[script] splitting comma text]]> Statistics: Posted by 23fx23 — 09 Mar 2010, 00:03


]]>
2010-01-06T11:55:28+02:00 2010-01-06T11:55:28+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=11170#p11170 <![CDATA[[script] splitting comma text]]> Statistics: Posted by amiga909 — 06 Jan 2010, 10:55


]]>
2010-01-06T11:31:01+02:00 2010-01-06T11:31:01+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=11169#p11169 <![CDATA[[script] splitting comma text]]> Statistics: Posted by 23fx23 — 06 Jan 2010, 10:31


]]>
2010-01-06T10:55:50+02:00 2010-01-06T10:55:50+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=11166#p11166 <![CDATA[[script] splitting comma text]]>

CODE:

/// commastring splitter by emoon//////const stringCount = 6;  // if this is too small, it doesn't like it.....var outputs    &#58; array of Tparameter;var input      &#58; Tparameter;var strings    &#58; array of String;var commatext  &#58; String;// destroy// initialisation &#58; create parametersprocedure init;var digit  &#58; string;var i  &#58; integer; begin    input &#58;= CreateParam&#40;'commaText',ptTextField&#41;;    SetIsOutput&#40;input,false&#41;;        setArrayLength&#40;strings, stringCount&#41;;    setArrayLength&#40;outputs, stringCount&#41;;         for i &#58;= 0 to &#40;stringCount - 1&#41; do begin        digit &#58;= IntToStr&#40;i + 1&#41;;        outputs&#91;i&#93; &#58;= CreateParam&#40;'String ' + digit,ptTextField&#41;;        SetIsInPut&#40;Outputs&#91;i&#93;,false&#41;;    end;end;procedure Callback&#40;n&#58;integer&#41;;var charCount &#58; integer;var i &#58; integer;var ch&#58; string;var pos&#58; integer;begin     commatext &#58;= ' ' + getStringValue&#40;Input&#41; + ',';     i &#58;= 0;     charCount &#58;= 0;     for pos &#58;= 1 to length&#40;commatext&#41; do     begin        ch &#58;= copy&#40;commatext,pos,1&#41;;               if &#40;ch = ','&#41; then         begin            strings&#91;i&#93; &#58;= copy&#40;commatext,pos - charCount + 1, charCount - 1&#41;;            SetStringValue&#40;Outputs&#91;i&#93;,strings&#91;i&#93;&#41;;            strace&#40;'in loop ' + strings&#91;i&#93;&#41;;            // a little bounds checking            if &#40;i = length&#40;strings&#41;&#41; then break;             i &#58;= i + 1;            charCount &#58;= 0;                   end;        charCount &#58;= charCount + 1;                end;       end;// no process bloc

Statistics: Posted by woodslanding — 06 Jan 2010, 09:55


]]>
2010-01-05T11:34:41+02:00 2010-01-05T11:34:41+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=11155#p11155 <![CDATA[[script] splitting comma text]]>
or to make it in patch, I usually cascade several list box with same comma in, to each next I add 1 to input.
so that first list ouputs text 1, second text 2 ect, but from same comma in that will update all if changed.

In my square add on I made a system like this:
every bus name is linked to the text output of a list box. all list box receive same comma text from a bus "comma text"
then bus 1 list box is set on 1, bus 2 on 2 ect, update master list will update all as well.
hope it helps.

look like this:
Image

Statistics: Posted by 23fx23 — 05 Jan 2010, 10:34


]]>
2010-01-05T11:04:35+02:00 2010-01-05T11:04:35+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=11154#p11154 <![CDATA[[script] splitting comma text]]>
Has this been done? I couldn't find an example. Does comma-text have quotes on each element that have to be stripped out? Commas?

I think I can figure it out, but not tonight--too late. But any tips welcome.

Wouldn't be necessary at all if usine mixed busses same as other objects :(

but this is "not how it's done".

Thanks!
-e

Statistics: Posted by woodslanding — 05 Jan 2010, 10:04


]]>
BrainModular BrainModular Users Forum 2010-03-09T01:03:53+02:00 https://brainmodular.org/forums/app.php/feed/topic/1846 2010-03-09T01:03:53+02:00 2010-03-09T01:03:53+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=12433#p12433 <![CDATA[[script] splitting comma text]]> Statistics: Posted by 23fx23 — 09 Mar 2010, 00:03


]]>
2010-01-06T11:55:28+02:00 2010-01-06T11:55:28+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=11170#p11170 <![CDATA[[script] splitting comma text]]> Statistics: Posted by amiga909 — 06 Jan 2010, 10:55


]]>
2010-01-06T11:31:01+02:00 2010-01-06T11:31:01+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=11169#p11169 <![CDATA[[script] splitting comma text]]> Statistics: Posted by 23fx23 — 06 Jan 2010, 10:31


]]>
2010-01-06T10:55:50+02:00 2010-01-06T10:55:50+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=11166#p11166 <![CDATA[[script] splitting comma text]]>

CODE:

/// commastring splitter by emoon//////const stringCount = 6;  // if this is too small, it doesn't like it.....var outputs    &#58; array of Tparameter;var input      &#58; Tparameter;var strings    &#58; array of String;var commatext  &#58; String;// destroy// initialisation &#58; create parametersprocedure init;var digit  &#58; string;var i  &#58; integer; begin    input &#58;= CreateParam&#40;'commaText',ptTextField&#41;;    SetIsOutput&#40;input,false&#41;;        setArrayLength&#40;strings, stringCount&#41;;    setArrayLength&#40;outputs, stringCount&#41;;         for i &#58;= 0 to &#40;stringCount - 1&#41; do begin        digit &#58;= IntToStr&#40;i + 1&#41;;        outputs&#91;i&#93; &#58;= CreateParam&#40;'String ' + digit,ptTextField&#41;;        SetIsInPut&#40;Outputs&#91;i&#93;,false&#41;;    end;end;procedure Callback&#40;n&#58;integer&#41;;var charCount &#58; integer;var i &#58; integer;var ch&#58; string;var pos&#58; integer;begin     commatext &#58;= ' ' + getStringValue&#40;Input&#41; + ',';     i &#58;= 0;     charCount &#58;= 0;     for pos &#58;= 1 to length&#40;commatext&#41; do     begin        ch &#58;= copy&#40;commatext,pos,1&#41;;               if &#40;ch = ','&#41; then         begin            strings&#91;i&#93; &#58;= copy&#40;commatext,pos - charCount + 1, charCount - 1&#41;;            SetStringValue&#40;Outputs&#91;i&#93;,strings&#91;i&#93;&#41;;            strace&#40;'in loop ' + strings&#91;i&#93;&#41;;            // a little bounds checking            if &#40;i = length&#40;strings&#41;&#41; then break;             i &#58;= i + 1;            charCount &#58;= 0;                   end;        charCount &#58;= charCount + 1;                end;       end;// no process bloc

Statistics: Posted by woodslanding — 06 Jan 2010, 09:55


]]>
2010-01-05T11:34:41+02:00 2010-01-05T11:34:41+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=11155#p11155 <![CDATA[[script] splitting comma text]]>
or to make it in patch, I usually cascade several list box with same comma in, to each next I add 1 to input.
so that first list ouputs text 1, second text 2 ect, but from same comma in that will update all if changed.

In my square add on I made a system like this:
every bus name is linked to the text output of a list box. all list box receive same comma text from a bus "comma text"
then bus 1 list box is set on 1, bus 2 on 2 ect, update master list will update all as well.
hope it helps.

look like this:
Image

Statistics: Posted by 23fx23 — 05 Jan 2010, 10:34


]]>
2010-01-05T11:04:35+02:00 2010-01-05T11:04:35+02:00 https://brainmodular.org/forums/viewtopic.php?t=1846&p=11154#p11154 <![CDATA[[script] splitting comma text]]>
Has this been done? I couldn't find an example. Does comma-text have quotes on each element that have to be stripped out? Commas?

I think I can figure it out, but not tonight--too late. But any tips welcome.

Wouldn't be necessary at all if usine mixed busses same as other objects :(

but this is "not how it's done".

Thanks!
-e

Statistics: Posted by woodslanding — 05 Jan 2010, 10:04


]]>