Path: utzoo!mnetor!uunet!husc6!rutgers!ames!ptsfa!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga Subject: Re: Straightforward examples sought Message-ID: <4843@well.UUCP> Date: 25 Dec 87 00:47:56 GMT References: <4312@garfield.UUCP> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Distribution: na Organization: Bleep Gzorp! Lines: 26 Keywords: rawkey lists In article <4312@garfield.UUCP> john13@garfield.UUCP (John Russell) writes: >I'm looking for illustrative examples in source code on a couple of topics. > >First is list creation/handling using the Exec functions. Is it just me or are >these terribly documented? The reference I use (Amiga Programmer's Handbook) >doesn't mention the NewList() function and neither it nor the RKM is very >helpful about what has to be initialized manually and what the system will >do for you. > NewList() is (I'm 99.44% sure) provided in the Exec support library, which gets linked to your program. It works like this: -------- foo () { struct List list; NewList (&list); } -------- Ta da! _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape ihnp4!ptsfa -\ \_ -_ Recumbent Bikes: dual ---> !{well,unicom}!ewhac O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack") "Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor