Results 1 to 9 of 9

Thread: Raise parantesis

  1. #1

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    How can I have a program raise the parantesis??

    Like this:

    (7x + 2) - (3x - 3)

    so it says

    7x + 2 - 3x + 3

    ???
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  2. #2
    Fanatic Member
    Join Date
    Sep 2000
    Location
    UK.
    Posts
    728

    Wink Suggestions

    First, tokenise the expression. Then, taking note of the operator between the brackets (+ or -), edit the tokens in the following bracket. For example, changing unary minuses minus another number to plus etc.

    Just output the data to a string. Nice and easy

    Laterz
    Digital-X-Treme
    Contact me on MSN Messenger: [email protected]

    [VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
    / (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]

  3. #3
    Banned
    Join Date
    Feb 2001
    Location
    Back to sh*tland
    Posts
    294
    Can you say what tokenise means please?

  4. #4
    Fanatic Member
    Join Date
    Sep 2000
    Location
    UK.
    Posts
    728

    Smile Tokenise

    To tokenise an expression means to split it into 'tokens', which are the individual elements of the expression. For example, to tokenise the following expression:

    2*3--2+2*-3--2

    We would get 12 seperate tokens.

    2
    *
    3
    -
    -2
    +
    2
    *
    -
    3
    -
    -2

    Laterz
    Digital-X-Treme
    Contact me on MSN Messenger: [email protected]

    [VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
    / (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]

  5. #5
    romanize
    Guest
    i have that in javascript here .. i had been working on it until i saw a TI-89 (and others) that can do all that stuff and much more ..

  6. #6
    Banned
    Join Date
    Feb 2001
    Location
    Back to sh*tland
    Posts
    294
    My favourite language german. What does it say?
    At least it seems like german to me...

  7. #7
    romanize
    Guest

    it actually is

    does it matter? .. it works in german, too..

  8. #8
    Banned
    Join Date
    Feb 2001
    Location
    Back to sh*tland
    Posts
    294
    I pressed OK and it didn't raise the parentesis the expression had.

  9. #9
    romanize
    Guest

    yeah

    the "result" as far it does it should appear last at the "blue screen" .. i haven't finished that yet, and i never will (like most of my appz and pages and so on), so don't expect it to do, what it promises (in german, of cos'). try to enter smth like 10x + 20x(20 - 3)+5(4-5-56x)+1=0 , if u want .. have a nice day ..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width