Page 1 of 1
array from text
Posted: Wed Jul 27, 2016 2:43 pm
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?
Re: array from text
Posted: Thu Jul 28, 2016 12:51 pm
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
Re: array from text
Posted: Wed Aug 03, 2016 4:59 pm
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?
Re: array from text
Posted: Fri Aug 26, 2016 7:39 am
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.