⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 who.java

📁 JAVA 数学程序库 提供常规的数值计算程序包
💻 JAVA
字号:
package jmathlib.toolbox.general;

import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.interpreter.*;
import jmathlib.core.functions.ExternalFunction;

import java.util.*;
/**An external function for getting the stored variables*/
public class who extends ExternalFunction
{
	public OperandToken evaluate(Token[] operands)
	{

		//if (operands != null)
   		//    throwMathLibException("who requires no arguments");

		Variable var;

		getInterpreter().displayText("\nYour variables are:\n");

		Iterator iter = getVariables().getIterator();
		while(iter.hasNext())
		{
		    Map.Entry next = ((Map.Entry)iter.next());
		    var = ((Variable)next.getValue());
		    getInterpreter().displayText(var.getName());
		}

		return null;		
	}
}

/*
@GROUP
general
@SYNTAX
who
@DOC
Returns a list of all the variables in the system.
@EXAMPLES
<programlisting>
who 
ans 
x 
y
</programlisting>
@NOTES
@SEE
whos
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -