Solved

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

Posted on 2013-05-10
4
182 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Modal Popup Extender control 1 53
RLDC Reporting in Visual studio 11 45
ASP.NET (VB) return a record 2 52
.Net remove carriage returns, line feeds and tabbs 5 18
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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