[Gambas-user] Strange Bug

Benoit Minisini gambas at ...1...
Fri Nov 24 19:19:29 CET 2006


On Friday 24 November 2006 14:29, Charlie Reinl wrote:
> Am Donnerstag, den 23.11.2006, 21:09 -0800 schrieb R. Stormo:
> > Charlie Reinl wrote:
> > > Salut,
> > >
> > > try this.
> > >
> > > The given Form.Titel = 'Test47' will be set if you uncomment the 'Dim j
> > > as Integer =' in class Form1.
> > >
> > > Amicalment
> > > Charlie
> >
> > I think the bug is all yours ;)
>
> Ok, for that.
> Thats not a project, thats a showcase.
>
> But the Bug is that NO ERROR raise,
>  when next line ist NOT an empty line
> Seams that is read like
>
> DIM j AS Integer = ME.Title = "Test44"
>

This is not a bug, this is the standard behaviour of the compiler.

The rule is: when reading an expression, or the second argument of an 
operator, a single newline is ignored.

This allows you to write complex expressions on several lines.

For example, you can write:

a = b & c & d &
    e & f & g

But not:

a = b & c & d
    & e & f & g

Regards,

-- 
Benoit Minisini





More information about the User mailing list