<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />我有一个数字编辑框,当没有指定任何内容时,我想为我的变量分配一个默认值并提示一条消息。 如果没有指定任何内容(意味着用户没有在数字框中输入任何内容)并且我在调试器的“监视”窗口中查看我的变量,它似乎有一个值“。”但我找不到匹配项(请参阅下面的脚本):
stepSize = 10;New Window( "", < V List Box( Panel Box( "Please specify", H List Box( Text Box( "Step " ), tBox = Number Edit Box( defaultStepSize ), Button Box( "OK", stepSize = tBox << Get; ) ) ) ) );If( stepSize == "." | stepSize == 0 | !Is Number( stepSize ) | stepSize == "" | Is Empty(stepSize), stepSize = 10; Beep(); New Window( "No Step Specified", < H List Box( Text Box( "Either No Step or 0 was specified! Will use the default of 10!" ), Button Box( "OK" ) ) ););
Number Edit Box 什么都不指定时的返回值是多少?
谢谢。 考虑到我认为我尝试了文档中提供的所有“Is Whatever”,我不敢相信我错过了“Is Missing”。 哈哈。
如果(缺少(步长)== 1 |步长== 0 | !Is Number( stepSize ) |步长== “” |为空(步长),