Re: A89: Re: C problem...
[Prev][Next][Index][Thread]
Re: A89: Re: C problem...
> >Just curious: why not ngetchx()?
>
> Why? wouldn't it take more to get the key and display it rather then just
> echo to the screen automatically?
I missed that it echoed chars...
> > > return;
> >
> >Not strictly necessary since the function doesn't return any value and
> >since the
> >function is already done anyway.
> Why not, shouldn't you always return a value, or null? is it faster not to
> if it is null?
You defined the function as "void", meaning that it doesn't return a value. An
empty "return" just exits the function - and can be placed anywhere *within* the
function, even inside several levels of nested loops. But here it's both at the
very end of the function _and_ in a function that doesn't return anything - so
it's not necessary at all.
(Of course, it might have been optimized away depending on how smart the
compiler is)
/ Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF Quote follows:
It is traditional, when loading wire trolleys, to put the most fragile
items at the bottom.
-- (Terry Pratchett, Reaper Man)
Follow-Ups:
References: