HP Forums

Full Version: input with variables in domains
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

The following code, INPUT CMD test, if I define that only accept real numbers and lists, only allows numbers, why not list?

PHP Code:
export test() 
begin
  local DOM_REAL_
:=0DOM_STRING_:=2DOM_LIST_:=6DOM_ALL:=-1;
  
local s
  
local p

  print();
  
s:="\"TEST INPUT\""
  print(
s); wait;
 
  
//if input( { { p, [ DOM_LIST_ ] } },"TITLE" ) then   print(p); wait; end; // ok
  //if input( { { p, [ DOM_ALL ] } },"TITLE" ) then   print(p); wait; end; // ok
  //if input( { { p, [ 0, 6] } },"TITLE" ) then print(p); wait; end;
  
if input( { { p, [ DOM_REAL_DOM_LIST_ ] } },"TITLE" then print(p); waitend;

  print(
"Done"); wait;
end

test()
1 [ENTER] ok
{5} Invalid input ?
Reference URL's