Solved

Is there a way to tell if a character in a string is a supset or subset?

Posted on 2013-05-10
4
179 Views
Last Modified: 2013-05-17
Is there a way to tell if a character in a string is a supset or subset?
0
Comment
Question by:NevSoFly
  • 2
4 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
Comment Utility
Please elaborate.
0
 

Author Comment

by:NevSoFly
Comment Utility
My apologies I was using the wrong terminology.  I am trying to identify different parts of the expression  2x + 4y2. namely the 4y2 section, where the 2 at the end of the expression is an exponent (superscript).  It is possible that the 2 could also be a subscript in a different expression.

This part of the expression is displayed in a rich textbox and each character in it is assigned to an element in a string array using string.split().   I am attempting to writing a function to identify the different elements in the array (coefficient, variable and operator).  

I have identified everything except for the 2 and do not know how to proceed.

thanks for your time.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
Comment Utility
I think you can check for the previous token and if that is a character (y in this case) then assume it to be exponent.
0
 

Author Comment

by:NevSoFly
Comment Utility
yes that would work but only if the previous token was a variable.  but this answer is the closest I found.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now