From: Andrey Rybak <ra@iop.kiev.ua> To: "Список рассылки по использованию дистрибутивов ALT Linux" <community@altlinux.ru> Subject: Re: [Comm] value overflow on C Date: Wed, 22 Feb 2006 15:41:08 +0200 Message-ID: <43FC69F4.5010409@iop.kiev.ua> (raw) In-Reply-To: <20060222125640.GH19814@damir.rnd.local> > >> Поэтому мне надо просто детектировать, что я подошел к предельным >> величинам. Просто условными оператороми (if например) эта задача >> решается неудовлетворительно. >> > Почему? Даже с флажком от условного перехода (if) вы никуда не денетесь :( > > Я имел ввиду if c операторами "<" и ">". А так конечно - флаг используется вместе с if. >> А вопрос у меня возник, потому что помнится мне, что в ассемблере есть >> флажок переполнения байта величины (при инкременте например), поэтому >> думается мне, что при близости Си к низкоуровнему программированию, >> такая фича (определение превышения допустимой величины) должна быть. >> Именно поэтому я привел пример с ERANGE. >> >> Есть еще идеи? >> > Написать на асме функцию сложения, использующую этот флаг и использовать ее, > определив как inline для ускорения например. Правда это непортабельно. > > Не хочу, а придется. Но, кажется, должно быть чисто сишное решение. Может еще кто что скажет?
next prev parent reply other threads:[~2006-02-22 13:41 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-02-22 11:25 Andrey Rybak 2006-02-22 11:51 ` Damir Shayhutdinov 2006-02-22 12:51 ` Andrey Rybak 2006-02-22 12:56 ` Damir Shayhutdinov 2006-02-22 13:41 ` Andrey Rybak [this message] 2006-02-22 14:23 ` Serge Skorokhodov 2006-02-22 14:36 ` Andrey Rybak 2006-02-22 15:13 ` Yura Kalinichenko 2006-02-23 9:39 ` Serge Skorokhodov 2006-02-23 9:51 ` Kaydannik Axel 2006-02-22 19:54 ` Kosserior 2006-02-22 17:28 ` spider 2006-02-22 18:19 ` Хихин Руслан 2006-02-25 12:07 ` Andrey Rybak
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=43FC69F4.5010409@iop.kiev.ua \ --to=ra@iop.kiev.ua \ --cc=community@altlinux.ru \ --cc=community@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git