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
Combination Circuits/Schematics
Re: Combination Circuits/Schematics
Ahh ... OK ... I understand better.
What threw me was the STRING output of the convert Boolean ... well, the choices in the Ruby module I see now as separate equations formulas.
Thanks Tiffy
What threw me was the STRING output of the convert Boolean ... well, the choices in the Ruby module I see now as separate equations formulas.
Thanks Tiffy
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Combination Circuits/Schematics
CONVERT ANY VALUE TO A BOOLEAN v1.2 (RUBY).
Here is an example of v1.2 that will eliminate the unwanted Triggers at the Output Terminal.
Here is an example of v1.2 that will eliminate the unwanted Triggers at the Output Terminal.
- Attachments
-
- Convert Any Value to a Boolean v1.2.fsm
- (6.22 KiB) Downloaded 987 times
-
tiffy - Posts: 400
- Joined: Wed May 08, 2013 12:14 pm
Re: Combination Circuits/Schematics
tiffy wrote:CONVERT ANY VALUE TO A BOOLEAN v1.2 (RUBY).
Here is an example of v1.2 that will eliminate the unwanted Triggers at the Output Terminal.
An interesting idea, thanks.
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
Re: Combination Circuits/Schematics
tiffy wrote:With the first two raw examples, I only wanted to put forward the idea in the hope that the more competent Ruby programmers will / can take it a step or two further in some practical examples and also share some of their practical ideas on this.
More of an observation than an example - that with the addition of Ruby, FlowStone now has three different definitions of what a boolean is! In 'green', zero = false and non-zero (but usually one) = true, but in DSP/Assembly, zero is still false, but true is an "all-bits" bitmask that isn't even a real number. And now, in Ruby, only nil/false are false, and absolutely anything else counts as true!
I must admit that when sending a value to a RubyEdit boolean output, the way that the value is translated almost as if it's a 'green' value caught me out a few times - I expected that it would just use the Ruby definition (equivalent to the !!-trick.)
Maybe worth pointing out too, that within Ruby code (i.e. not when sending to an output), you very rarely need the !!-trick. For control statements like if, unless, while, until, the conversion is always implied - so people shouldn't panic and go through all their Ruby code adding lots of exclamation marks. However, when you're expecting a boolean RubyEdit output to do what you want, or absolutely need true/false in the code, it's very handy indeed!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Combination Circuits/Schematics
Quote: "Maybe worth pointing out too,... - so people shouldn't panic and go through all their Ruby code adding lots of exclamation marks. However, when you're expecting a boolean RubyEdit output to do what you want, or absolutely need true/false in the code, it's very handy indeed!"
I had a problem getting the first MP3 file, which has the index 0, in a player to load from a list in the player into the queue. All the other files would load correctly except for the first file in the list. Then, I used the "!!-trick" for this purpose in order to get a trigger from the 0-indexed file. Maybe my ignorance but I do not know another way of doing this. Therefore, I upload the "!!-trick" in case someone else may need it too.
I had a problem getting the first MP3 file, which has the index 0, in a player to load from a list in the player into the queue. All the other files would load correctly except for the first file in the list. Then, I used the "!!-trick" for this purpose in order to get a trigger from the 0-indexed file. Maybe my ignorance but I do not know another way of doing this. Therefore, I upload the "!!-trick" in case someone else may need it too.
-
tiffy - Posts: 400
- Joined: Wed May 08, 2013 12:14 pm
Re: Combination Circuits/Schematics
tiffy wrote:SIMPLE CALCULATOR (Picture Only):
I made this simple calculator which supports working with two decimal numbers but it can only do one calculation at a time. All the functions on the keyboard are functional...however, no fancy glitter like multiple stack or continuous memory etc.
Please ask for help
I need a calculator file. To do education for my students. Thank you.
- yoye
- Posts: 1
- Joined: Tue Jan 07, 2020 8:05 am
Who is online
Users browsing this forum: No registered users and 68 guests