--- In [email protected], Brett McCoy <idragos...@...> wrote:
>
> On Sun, Dec 20, 2009 at 7:26 PM, bobtransformer
> <bobtransfor...@...> wrote:
> 
> >  I can define this structure as global, above main() (or at the top of 
> > main() , and use it just fine in the code...   But only once can I define 
> > it, it appears, or else I get this "expected an expression" error.
> 
> That's correct.
> 
> > But when I want to re-define the values somewhere in main() so I can call 
> > the function that uses this structure, like this:
> >
> >
> >   holding_cmd =
> >    {                  //Error here  "expected an expression"
> >        4100,
> >        10
> >    };
> >
> >
> > I get the error on that line with the opening brace.
> >
> > Any ideas ??
> 
> Yes, just set the values directly:
> 
> holding_cmd.start_addr = 4100;
> holding_cmd.num_reg = 10;
> 
> Is there a reason you can't do it that way?


Absolutely no problem !   I have been spending way too
much time on hardware and have  forgotten some basic
C programming methods I guess.


Thank you VERY much, Brett !!

boB



> 
> -- Brett
> ------------------------------------------------------------
> "In the rhythm of music a secret is hidden;
>     If I were to divulge it, it would overturn the world."
>                -- Jelaleddin Rumi
>


Reply via email to