You must put a semicolon to separate the variable declarations from
the program statements, e.g.

real NoSense(int addend)
{
    real counter;
    ;
    counter = addend/2;
    if (counter > 0)
        return sum[a];
}


--- In [EMAIL PROTECTED], "Holger K. Pedersen"
<[EMAIL PROTECTED]> wrote:
> I have noticed, the semicolon issue, when first statement is a
call to a
> static method. I also see this issue as a weird feature of X++.
Normally, it
> is used as a separator, but the compiler obviously has a faulty
behavior
> when it tries to figure out what is variable decalaration, and
whait is not.
>
> :-)
>
>
>
> >From: "Agus Riyadi" <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: <[EMAIL PROTECTED]>
> >Subject: [development-axapta] semicolon
> >Date: Mon, 31 May 2004 18:21:38 +0700
> >
> >hi all,
> >
> >
> >When coding in axapta, we must put semicolon before the first
statement, or
> >there will be "syntax error".
> >I just wonder why doesn't axapta itself put semicolon for all of
its
> >methods.
> >
> >Usually I don't get any problem with it, but then it annoy me
when
> >sometimes axapta says "...has no valid runable code.." for its
method that
> >I do not touch at all. This sometimes happen after xpo export-
import
> >activity that involve axapta's standard object. The message will
simply
> >disappear if I put the semicolon, but causing the object to be
in "usr"
> >layer.
> >Even though it is easy, but it is really annoying, especially
when it
> >occurs to many methods.
> >
> >Anyone could tell me why does it happen, or are there any tips to
get rid
> >off this problem ?
> >
> >thanks,
> >
> >agus
> >
> >
> >[Non-text portions of this message have been removed]
> >
> >



Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to