From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: fixed point math: SOLUTION!!! Date: 20 Feb 1997 20:40:30 GMT Organization: Oxford University Lines: 14 Message-ID: <5eicru$dft@news.ox.ac.uk> References: <5egfq4$3pk AT nr1 DOT toronto DOT istar DOT net> <5eh67b$m3i AT news DOT ox DOT ac DOT uk> <330CEF04 DOT 189D AT post DOT comstar DOT ru> NNTP-Posting-Host: mc31.merton.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Dim Zegebart (zager AT post DOT comstar DOT ru) wrote: : I read in GCC info (C Extensions chapter) what the best way to do such : things is : : #define substruct(a,b) ({int _a=a,_b=b,x;x=_a-_b;}) YM subtract :) This is fine if you're not worried about portability. It's a GNU C extension, though, which means that other compilers aren't likely to support it. -- George Foot Merton College, Oxford.