How to Remove string from calulator

How to Remove string from calulator

Page 1 of 1

2 Replies - 797 Views - Last Post: 25 May 2009 - 07:18 AM Rate Topic: -----

#1 sathishsuya  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 25-May 09

How to Remove string from calulator

Posted 25 May 2009 - 02:15 AM

Hi,

I have calulator while pressing the calculator buttons that corrsponding caption will display in text box
ex:(12 + 2+ (text1) - sum1+[Ref1]/[ref2])

1. how to remove [i have button for remove] string upto previous oprator
2. ex now if i cliked the remove button ex :(12 + 2+ (text1) - sum1+[Ref1]/ should be like this
3. again i clicked it should be like this ex :(12 + 2+ (text1) - sum1+

Please give the sample code for this

Regards
Sathish

This post has been edited by sathishsuya: 25 May 2009 - 04:58 AM


Is This A Good Question/Topic? 0
  • +

Replies To: How to Remove string from calulator

#2 noorahmad  Icon User is offline

  • Untitled
  • member icon

Reputation: 209
  • View blog
  • Posts: 2,290
  • Joined: 12-March 09

Re: How to Remove string from calulator

Posted 25 May 2009 - 04:26 AM

:code:
Was This Post Helpful? 0
  • +
  • -

#3 mark.bottomley  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 176
  • View blog
  • Posts: 990
  • Joined: 22-April 09

Re: How to Remove string from calulator

Posted 25 May 2009 - 07:18 AM

you are supposed to show an attempt at what you are trying to do - we don't like to do the work for you - especially your homework. Try looking at String.LastIndexOf("<your operator>") where <your operator is looped over the set of +, /, *, - and find the largest index to use in a .SubString expression. Watch out for the problem of "a - b" and "a + -b"
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1