From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!feeds.phibee-telecom.net!weretis.net!feeder4.news.weretis.net!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Thu, 30 Jul 2015 09:50:49 +0200 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <877fpi84o6.fsf@adaheads.sparre-andersen.dk> References: <2df4698f-4c8e-457c-822d-209cb2f8ab5e@googlegroups.com> NNTP-Posting-Host: 109.59.26.196.mobile.3.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: loke.gir.dk 1438242649 30823 109.59.26.196 (30 Jul 2015 07:50:49 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 30 Jul 2015 07:50:49 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:c3mCyy/9iShJcz5uRlJjkRSXkjg= Xref: number.nntp.giganews.com comp.lang.ada:194485 Date: 2015-07-30T09:50:49+02:00 List-Id: Simon Wright wrote: >> Simon Wright wrote: >>> return Tick * Time_Base ((if System.FreeRTOS.Tasks.In_ISR >>> then xTaskGetTickCountFromISR >>> else xTaskGetTickCount)); > I dunno. The version below is quite verbose, and verges on being less > readable. But this is a style issue, I think. > > if System.FreeRTOS.Tasks.In_ISR then > return Tick * Time_Base (xTaskGetTickCountFromISR); > else > return Tick * Time_Base (xTaskGetTickCount); > end if; I definitely find the latter more readable than the former (at least without syntax highlighting). Greetings, Jacob -- The so-called "desktop metaphor" of today's workstation is instead an "airplane-seat" metaphor.