[INTERPRETER]

* NEW: INPUT returns the read string if it cannot be converted to any 
  number or date.


git-svn-id: svn://localhost/gambas/trunk@4552 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2012-03-14 12:26:37 +00:00
parent 1aed08a8e7
commit 08fead2ea4

View file

@ -290,8 +290,16 @@ void SUBR_input(ushort code)
if (addr)
{
VALUE_from_string(SP, addr, STRING_length(addr));
STRING_free(&addr);
VALUE_from_string(SP, addr, STRING_length(addr));
if (SP->type == T_NULL)
{
SP->type = T_STRING;
SP->_string.addr = addr;
SP->_string.start = 0;
SP->_string.len = STRING_length(addr);
}
else
STRING_free(&addr);
}
SP++;