Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

array from text

For general discussion related FlowStone

array from text

Postby aombk » Wed Jul 27, 2016 2:43 pm

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?
User avatar
aombk
 
Posts: 34
Joined: Tue May 24, 2016 2:44 pm
Location: athens, greece

Re: array from text

Postby Jay » Thu Jul 28, 2016 12:51 pm

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 940 times
Jay
 
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

Re: array from text

Postby aombk » Wed Aug 03, 2016 4:59 pm

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?
User avatar
aombk
 
Posts: 34
Joined: Tue May 24, 2016 2:44 pm
Location: athens, greece

Re: array from text

Postby tester » Fri Aug 26, 2016 7:39 am

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.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet


Return to General

Who is online

Users browsing this forum: No registered users and 78 guests