none
Iterate String of Expression to Array of Array RRS feed

  • Question

  • Hi ,

    This is my input => ( A + B ) + D + ( ( A * V ) - D ) 

    I need to store like below any idea in C#,

    An array will grow dynamically based on inner expressions,

    A1[0][0] -> (A +B)

    A1[0][1] -> +

    A1[0][2] -> D

    A1[0][3] -> +

    A1[0][4] -> {    A2[0][0]- > (A*V),

                     A2[0][1] -> -

                     A2[0][2] -> D }

    Thanks,

    Vinoth.


    vinoth arun raj X


    Friday, July 19, 2013 5:42 AM

All replies

  • Sounds like you need an expression parser.  You might check here: http://csharpeval.codeplex.com/

    Tim Roberts, VC++ MVP Providenza & Boekelheide, Inc.

    Friday, July 19, 2013 6:31 AM
  • Hi Tim,

    Thanks for the reply.

    I have the concept to parse the expression string. But, What i need is, I need to split each every individual and stored into array,    

    "A1[0][0] -> (A +B)

    A1[0][1] -> +

    A1[0][2] -> D

    A1[0][3] -> +

    A1[0][4] -> {    A2[0][0]- > (A*V),

                     A2[0][1] -> -

                     A2[0][2] -> D }"  I need this format.


    Thanks.


    vinoth arun raj X

    Friday, July 19, 2013 7:21 AM
  • Hi Vinoth,

    Still unclear.

    Could you please describe your issue in detail so that more experts or communities can help you?

    Thanks.


    Caillen
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, July 24, 2013 5:32 AM
    Moderator