你好
我正在嘗試使用IF語句創建基本腳本,如果JMP中存在CASE語句,我並不熟悉,但是我嘗試做的事情與case語句相似。
1。要求用戶僅輸入1-20之間的數字
2。創建一個if語句並根據用戶輸入執行命令
例如:用戶輸入:2
*執行括號2中的腳本
您能建議一套可能有助於此的基本教程嗎?
您可以嘗試這樣的事情:)
userinput = New Window( "Collect user input", <<MODAL> 20,
New Window("Error!!", Text Box(" Please input a number from 1 to 20 ONLY! ")),
if(num(number_input) == 1,
//DO SOMETHING...
num(number_input) == 2,
//DO SOMETHING...
);
);</MODAL>您可以通過用戶界面更直接地進行操作。 試試這個代碼:
nw = new window("Test",
panel box("Click the icon to run the program: ",
lineup box(ncol(2),
text box("1. Tree Map"),
button box("", << set icon("TreeMap"),
<< set function(include("treemap.jsl"))),
text box("2. Neural Net"),
button box("", << set icon("NeuralNet"),
<< set function(include("NeuralNet.jsl"))),
text box("3. Model Comparison"),
button box("", << set icon("ModelComparison"),
<< set function(include("ModelComparison.jsl"))),
text box("4. SAS Pyramid"),
button box("", << set icon("SASPyramid"),
<< set function(include("SASPyramid.jsl"))),
),
),
);
您可以在我有的地方替換相應的代碼。 要獲得各種圖標,請使用賈斯汀·奇爾頓(Justin Chilton) 內置JMP圖標加入。