HP Forums
input with variables in domains - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: input with variables in domains (/thread-7456.html)



input with variables in domains - compsystems - 12-23-2016 12:21 AM

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 ?