コード例 #1
0
ファイル: Program.cs プロジェクト: clearz/MuParserSharp
            private static void ListExprVar(ParserX parser)
            {
                Console.WriteLine($"   Variables found in : \"{parser.GetExpr()}\"");
                Console.WriteLine("   -----------------------------\n");
                // Query the used variables (must be done after calc)
                var vmap = parser.GetExprVar();

                if (!vmap.Any())
                {
                    Console.WriteLine("Expression does not contain variables\n");
                }
                else
                {
                    foreach (var item in vmap)
                    {
                        Console.WriteLine($"      {item.Key} =  {item.Value}");
                    }
                }
                Console.WriteLine();
            }