Text to Number Actor ? Is it possible ?



  • Hi everybody

    _Excuse my poor english, I'm french_
    There is an actor, "Number to text", which converts a 'value' into the 'text' of this value.
    But how can I do the opposite ?
    For example (my problem here),
    I read with a "Text Chopper" a portion of a specific number ; in the entry, let say 23457814, i want the second and third number in the output, I can obtain easily 34.
    But this '34' is a text, not a number. I can't use it to input in a "Calculator" for example.
    Can I transform the text '34' into the value 34 ?
    Thanks for help, and I am sorry if it is a recurring issue...
    It was perhaps in the old forum, but I don't know how to reach it


  • The text parser actor will do this for you.

    Add a text parser actor and double click. If you are only working with integers, then use

    value_out : integer = #

    otherwise, for floating point numbers (i.e,. with a decimal point) use

    value_out : float=.#

    An output will appear called "value out." Send the text numbers into the input, and voila.

    Best Wishes,
    Mark



  • Thank you Mark !

    Aaah, "Text Parser"... My personal nightmare, as a french guy...
    First, the term "parser" isn't clear for us, perhaps because of the etymology. Maybe you should have named it "Text Analyser"...
    And second, the help file within the 'Edit Serial Input Parser', called **Decoding and Extracting Data Input Streams**
    is very difficult to understand when you are neither familiar to english nor familiar to, let say, engineer's language.
    This actor is particularly non intuitive, contrary to most of the others.
    Lots of Isadora's users are _**bidouilling**_ (i have not found the proper translation to the french verb "bidouiller", but it is a mix of hacking, tweaking, fiddling, let's-try-and-if-it-works-it's-cool...)
    In the future, it may be a good idea to give us some examples of particular usages of this wonderful but freaky actor !


  • Dear Fypy,

    There are some simple examples at the end of the document. Unfortunately, it must be complex because the same system is used to decode streams of data from RS-232 -- since there is no set format, the actor must try to accommodate every possibility. That makes it difficult to learn.
    Again, take a look at the examples at the end of the Help document for some simple cases.
    Best Wishes,
    Mark


  • Dear Mark,

    yes, thank you for this examples.
    But unfortunately they didn't really spoke to me (shame on me). Perhaps it's not my way to think. And I'm scared that I'm not alone...
    You know, we are often thinking in a symetrical way. For example if we see "RGB to HSB", we think (and hope) that there is "HSB to RGB" ; and there is !
    Can I suggest to add, in the help file of "Number to Text" actor, a short text to explain that if the user want to do the contrary, "Text to Number", he has to use a "Text Parser" with your explanation ?

Log in to reply
 

Looks like your connection to TroikaTronix Community Forum was lost, please wait while we try to reconnect.