?
Solved

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

Posted on 2013-05-10
4
Medium Priority
?
189 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 75

Expert Comment

by:käµfm³d 👽
ID: 39157662
Please elaborate.
0
 

Author Comment

by:NevSoFly
ID: 39158203
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 1500 total points
ID: 39165479
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
ID: 39176585
yes that would work but only if the previous token was a variable.  but this answer is the closest I found.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

850 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