Problem with G_ask_cell_old

Bill Brown brown at ginko.cecer.army.mil
Wed Dec 28 09:59:31 EST 1994


Using scanf leaves the newline character unread in the input stream (stdin).
G_ask_cell_old uses gets(), which reads until a newline character then
discards the newline & adds a null, leaving you with the null.

Probably the best way around this is to add:
fflush(stdin);
after you're done doing your scanf().

- Bill




More information about the grass-dev mailing list