array from text

For general discussion related FlowStone
Post Reply
User avatar
aombk
Posts: 34
Joined: Tue May 24, 2016 2:44 pm
Location: athens, greece
Contact:

array from text

Post by aombk »

i have several lines of text, separated by end of line (enter) in flowstone text module.
can i turn each line to an array string value?
Jay
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

Re: array from text

Post by Jay »

yes m8 you just attach your txt to the assign input on whichever array type you are using and read out the lines you want with a get at primitive

ive attached an example
txt to array.fsm
(1.75 KiB) Downloaded 1002 times
User avatar
aombk
Posts: 34
Joined: Tue May 24, 2016 2:44 pm
Location: athens, greece
Contact:

Re: array from text

Post by aombk »

oh thanks Jay, just saw your answer. (maybe this "Notify me when a reply is posted" should be on by default)

i solved it using this in ruby:

Code: Select all

a = @text.split("\r\n")
output "array", a


is any solution better than the other?
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: array from text

Post by tester »

Under high load in ruby routines within schematic - ruby may shut down. Greens are more stable. Plus - if your schematic contains hunderts of ruby modules - the schematic may get slower in some aspects.

But I guess in your case - it's a matter of taste.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Post Reply