From: "Ben Combee" <[EMAIL PROTECTED]>

> > >  frmP = FrmInitForm (AboutForm);
> > > FrmSetActiveForm(frmP);
> > > CtlSetValue((ControlType *)GetObjectPtr(AboutTestCheckbox),0);
> > > FrmDoDialog (frmP);
> > > Int16 iTemp = CtlGetValue((ControlType
> *)GetObjectPtr(AboutTestCheckbox));
> [snip]
> What environment are you using?  CodeWarrior won't even compile this.  It
> doesn't like the Int16 declaration in the middle of the switch inside of
> MainFormDoCommand, complaining about "expression syntax error".
> [snip]
> CodeWarrior with the PalmOS 3.5 SDK does like this, since Int16 and UInt16
> are the types that replaced SWord and Word.  Also, the declaration is
legal
> if compiled as C++, although declarations in the middle of a switch are a
> bit unusual due to problems with constructor/destructor scoping.

What I meant, Ben, was that the CodeWarrior C compiler will not compile
this.   Although the "expression syntax error" message may make it look like
the problem is the data type (Int16), actually the problem is that the
CodeWarrior C compiler won't let you declare and define a variable at that
point in the function.  However, if it did compile he must have been using
C++, so my suggestion was moot.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to