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

ifthenelse for arrays in ruby?

For general discussion related FlowStone

ifthenelse for arrays in ruby?

Postby tester » Fri Jul 18, 2014 6:05 pm

How to make ifthenelse for arrays in ruby?

-> Input array
-> equals
-> conditions array
-> things to send to output
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

Re: ifthenelse for arrays in ruby?

Postby Tronic » Fri Jul 18, 2014 6:10 pm

Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: ifthenelse for arrays in ruby?

Postby Tronic » Fri Jul 18, 2014 6:13 pm

Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: ifthenelse for arrays in ruby?

Postby tester » Fri Jul 18, 2014 6:13 pm

...arrays...
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

Re: ifthenelse for arrays in ruby?

Postby Tronic » Fri Jul 18, 2014 6:15 pm

Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: ifthenelse for arrays in ruby?

Postby Tronic » Fri Jul 18, 2014 6:19 pm

Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: ifthenelse for arrays in ruby?

Postby tester » Fri Jul 18, 2014 6:22 pm

I just would like to simplify this.

Basically there will be few of such units, each for different comparator. This is for splitting a list of strings according to numeric parameter placed within these strings.
Attachments
Schematic1.fsm
(591 Bytes) Downloaded 883 times
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

Re: ifthenelse for arrays in ruby?

Postby Tronic » Fri Jul 18, 2014 6:28 pm

can you post a logical example of what you want?
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: ifthenelse for arrays in ruby?

Postby TheOm » Fri Jul 18, 2014 7:10 pm

You could use group_by.
Attachments
Schematic1_simple.fsm
(616 Bytes) Downloaded 865 times
TheOm
 
Posts: 103
Joined: Tue Jan 28, 2014 7:35 pm
Location: Germany

Re: ifthenelse for arrays in ruby?

Postby tester » Fri Jul 18, 2014 8:53 pm

Hi @TheOm.

Your solution still refers to ranges. I'd like to compare the input array to single element (what I posted above was unmodified module, that operates on ranges). Or rather...

@Tronic.

Simple case scenario. Let say that I have an array:

a
a
b
a
c
b
c

Concept:
Produce arrays of indexes that refer to specific values.

indexes @a
0
1
3

indexes @b
2
5

indexes @c
4
6

indexes @N
...
...

*

I'm still defining the concept, but I hope I made this one clear this time. :-)
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

Next

Return to General

Who is online

Users browsing this forum: No registered users and 74 guests