Need a function... is similar BIOSKEY in C. This is a poll of the console without waiting (!!!)
I need to know that the console has data... then read them with the "input" function.
Freebasic functions (input, line input) WAIT ! (my program stops waiting) This is not acceptable :)
Linux version bioskey:
Code: Select all
int Bioskey(void)
{
fd_set readfds;
struct timeval timeout;
FD_ZERO(&readfds);
FD_SET(fileno(stdin), &readfds);
timeout.tv_sec = 0;
timeout.tv_usec = 0;
select(16, &readfds, 0, 0, &timeout);
return(FD_ISSET(fileno(stdin), &readfds));
}