Deutsch English Français Italiano |
<uukf9l$3vkll$1@i2pn2.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder6.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: fir <fir@grunge.pl> Newsgroups: comp.lang.c Subject: Re: improve that function (bytes_dig_int) Date: Wed, 03 Apr 2024 22:47:45 +0200 Organization: i2pn2 (i2pn.org) Message-ID: <uukf9l$3vkll$1@i2pn2.org> References: <uukcop$3vhcj$1@i2pn2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 3 Apr 2024 20:47:49 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="4182709"; mail-complaints-to="usenet@i2pn2.org"; posting-account="+ydHcGjgSeBt3Wz3WTfKefUptpAWaXduqfw5xdfsuS0"; User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24 In-Reply-To: <uukcop$3vhcj$1@i2pn2.org> X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 1595 Lines: 30 fir wrote: > void BytesTest() > { > bytes_load("some.txt"); > > while(bytes_cursor<bytes_size) > { > int value = bytes_dig_int_from_cursor(); > if(bytes_cursor>bytes_size) break; > printf("\n %d", value); > } > } > as to this part i was thinking that using the bytes_cursor (or how to call it better) would be good idea and would simplify the usage of it but this loop is also overcomp0-lex so im not sure if to using sorta global variable (like "none") wouldnt be better here thsi is odlschool idea and i dont seen its used today but here it is just simple for(;;) { int value = dig_int(); if(none) break; }