Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!uxc!uxc.cso.uiuc.edu!uxg.cso.uiuc.edu!uxa.cso.uiuc.edu!emb90619 From: emb90619@uxa.cso.uiuc.edu Newsgroups: comp.sys.mac.programmer Subject: Re: MPW 3.0: Booleans and var #of args. Message-ID: <227700004@uxa.cso.uiuc.edu> Date: 1 Feb 89 05:40:00 GMT References: <3532@mit-amt> Lines: 16 Nf-ID: #R:mit-amt:3532:uxa.cso.uiuc.edu:227700004:000:793 Nf-From: uxa.cso.uiuc.edu!emb90619 Jan 31 23:40:00 1989 The problem with your Boolean assignment is the -w2 flag. This flag creates a condition where the compiler warns you of additional constructs which may be ok, but look fishy. enum types are ints (longs) in 3.0 ALWAYS. They are converted to short when sent to toolbox routines requiring shorts. To define a variable length argument, you use the elipsis (...) in the argument list. This must be three periods, you CANNOT use the mac option-; keystroke. So, void foo(...); is a prototype for a function foo, returning no value and having a variable length of arguments. Of course, no type checking will occur within the variable list, then. If you have some variables you want checked, you can put the elipsis later. For example, void foo(short a, long *b, ...); is a proper prototype.