Ruby basic examples

For general discussion related FlowStone
Post Reply
User avatar
gvalletto
Posts: 117
Joined: Fri Jul 09, 2010 10:15 pm
Location: Argentina
Contact:

Ruby basic examples

Post by gvalletto »

Here I put a scheme with small Ruby examples for beginners (like me...). You can add anything related.
Thanks to @Tulamide by his help.
Attachments
Ruby basics fs3081.fsm
(2.92 KiB) Downloaded 909 times
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: Ruby basic examples

Post by RJHollins »

Thanks gvalletto ... this one worked for me.

This is a helpful idea for many of us not experienced doing programing often.

With my latest little project, I leaned more to using RUBY for particular functions needed.

With that, I spent most my time scanning several RUBY sites for syntax details ... particularly those that relate to
FS version of RUBY. I get stuck on some of the basics, but once I get going, it gets better.

What's amazing is how powerful RUBY brings to the design compared to assembling PRIMITIVEs.

Maybe I can pull some of my basic RUBY routines to add to this.

Thanks again.
User avatar
gvalletto
Posts: 117
Joined: Fri Jul 09, 2010 10:15 pm
Location: Argentina
Contact:

Re: Ruby basic examples

Post by gvalletto »

Your wellcome. Any collaboration of anybody will be good for all of us... Another benefit of those schemes is to bring ready library so no to have to type code from scratch, so it save work time.

Also gurus are wellcome ;)
Nickateenbeats
Posts: 37
Joined: Tue Jul 24, 2018 11:32 pm

Re: Ruby basic examples

Post by Nickateenbeats »

Here is some more Ruby code snippets, i didn't write them but im sure some of you could find these useful.
Attachments
Schematic1.fsm
(2.89 KiB) Downloaded 901 times
User avatar
gvalletto
Posts: 117
Joined: Fri Jul 09, 2010 10:15 pm
Location: Argentina
Contact:

Re: Ruby basic examples

Post by gvalletto »

Hi again!
This is the Ruby Sample and Hold found in the User Guide of FS (page 143):
S&H User Guide.JPG
S&H User Guide.JPG (21.28 KiB) Viewed 11509 times


And this is a simplification that I made:
S&H.JPG
S&H.JPG (30.81 KiB) Viewed 11509 times


It works fine here... what do you think about? Any risk to use it?
Post Reply