Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!cbmvax!ken From: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Newsgroups: comp.sys.amiga.programmer Subject: Re: amiga data types Message-ID: <22296@cbmvax.commodore.com> Date: 10 Jun 91 15:02:53 GMT References: <68P831w164w@guru.pub.uu.oz.au> Reply-To: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Organization: Commodore, West Chester, PA Lines: 18 In article <68P831w164w@guru.pub.uu.oz.au> terminal@guru.pub.uu.oz.au (bernard) writes: >Hi there.. >Just wondering if anyone could help me with the amiga data types as >defined in exec/types.h.. > >Common problems I am having are scanning a UBYTE[] into UWORD >components.. like this > >UBYTE dest[21]; >strcpy (dest, "366/359.3"); >sscanf(dest, "%d/%d.%d", &net, &node, &point); >where net, node and point are UWORD net, node, point; Are you using long integers (i.e. int = 32 bits)? If so, try: sscanf(dest, "%ld/%ld.%ld", &net, &node, &point); -- Ken Farinsky - CATS - Commodore Business Machines