Group Abstract Group Abstract

Message Boards Message Boards

How to parse the output of FullSimplify?

GROUPS:
I'm writing a program and using FullSimplify.  Its output is:

n == 31977 && m == 27693

I just want to collect 31977 into a var.  What is the easiest way to do that?

thanks!
-Joe
POSTED BY: Joe Gilray
Answer
11 months ago
Maybe
In[1]:= var = n /. ToRules[n == 31977 && m == 27693]

Out[1]= 31977
POSTED BY: Ilian Gachevski
Answer
11 months ago
Thanks Ilian.

I'm still learning how to better use the documentation.  In this case I thought, "it looks like an expression", so I started with the Expression page which took me to ToExpression and then ToString, but I never saw ToRules[].

Thanks again,
-Joe
POSTED BY: Joe Gilray
Answer
11 months ago