[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:
parent
1aed08a8e7
commit
08fead2ea4
1 changed files with 10 additions and 2 deletions
|
@ -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++;
|
||||
|
|
Loading…
Reference in a new issue