Thanks!!!  Yeah..when you have more than one command in the if statement you
have to add brackets..doooh!

I appreciate the help!

> if (SysAlarms == 0)
>     {        // Please add me
>     size = 9;
>     StrCopy(&tempdata, &no);            <--  Line 45
>     }        // Please add me
> else if (SysAlarms == 1)



Dave Lippincott <[EMAIL PROTECTED]> wrote in message
news:47188@palm-dev-forum...
>
> How about using brackets so the 'if' doesn't break
> if (SysAlarms == 0)
>     {        // Please add me
>     size = 9;
>     StrCopy(&tempdata, &no);            <--  Line 45
>     }        // Please add me
> else if (SysAlarms == 1)
>
> ----- Original Message -----
> From: "Jim Garozzo" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Thursday, April 26, 2001 1:21 PM
> Subject: Re: StrCopy Problem
>
>
> > Yeah..i thought that too..but when i compile
> >
> > Line 49:        StrCopy(tempdata, no);
> > Line 50:   else if (SysAlarms == 1)
> >
> > I get a parse error for this line.
> >
> > frmMain.c:50: parse error before `else'
> >
> > But, to me, it looks like I did everything right.
> >
> >
> > Mike Walters <[EMAIL PROTECTED]> wrote in message
> news:47173@palm-dev-forum...
> > >
> > > You don't need the & before the argument names.  Since they are
arrays,
> > they
> > > are already basically the same as pointers.
> > >
> > > Mike Walters
> > > Rose Software
> > > www.rosesw.com
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Jim
> > > Garozzo
> > > Sent: Thursday, April 26, 2001 10:42 AM
> > > To: Palm Developer Forum
> > > Subject: StrCopy Problem
> > >
> > >
> > > For some unknown newbie error that I'm completly missing the point,
that
> > > when i'm using StrCopy i'm getting incompatible pointer type warning
and
> > and
> > > unknown parse error.
> > >
> > > I'm stuck and was wondering what goofy mindmeld error I did in this
> line:
> > > StrCopy(&tempdata, &no);
> > >
> > > Below is more info.
> > >
> > > Thanks!
> > >
> > > Jim
> > >
> > > Error Output:
> > >
> > > frmMain.c:45: warning: passing arg 1 of `StrCopy' from incompatible
> > pointer
> > > type
> > > frmMain.c:45: warning: passing arg 2 of `StrCopy' from incompatible
> > pointer
> > > type
> > > frmMain.c:46: parse error before `else'
> > > make: *** [Debug/frmMain.o] Error 1
> > >
> > >
> > > ********************
> > >
> > >  Char tempdata[15];
> > >  const Char alarm[] = " Alarms";
> > >  const Char no[] = "No";
> > >  Int16 size;
> > >
> > >
> > >  SysAlarms = 0;
> > >
> > >  StrIToA(tempdata, SysAlarms);
> > >
> > >   if (SysAlarms == 0)
> > >        size = 9;
> > >        StrCopy(&tempdata, &no);            <--  Line 45
> > >   else if (SysAlarms == 1)
> > >        size = 8;
> > >   else
> > >        size = 9;
> > >
> > >  StrNCat(tempdata, alarm, size);
> > >
> > >
> > >
> > >
> > >
> > > --
> > > For information on using the Palm Developer Forums, or to unsubscribe,
> > > please see http://www.palmos.com/dev/tech/support/forums/
> > >
> > >
> > >
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
> >
>
>
>



-- 
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