[Gambas-user] syntax error

Neil Fallon nfallo at ...734...
Sun Mar 6 18:13:39 CET 2005


Hi Leo,

I was trying to use it withing a sub only.  It should have worked.  The
variable is only used in this sub.  I therefore should not have to make
it public or private in the general declarations section.  I should be
able to just Dim whatever in the sub and use the variable in the sub.

Neil

On Sun, 2005-03-06 at 18:08 +0100, Leo Barnhoorn wrote:
> Hello Neil,
> 
> You have to use PUBLIC or PRIVATE as general declaretion, because it is 
> outsite a SUB or FUNCTION.
> 
> DIM you use that within SUB's or FUNCTIONS
> 
> Regards,
> Leo.
> 
> On Sunday 06 March 2005 17:42, Neil Fallon wrote:
> > Hi,
> >
> > Could someone please look at this code and tell me why I am getting a
> > syntax error on the first line?  It's simple stuff that shouldn't be
> > generating an error.
> >
> > DIM strQuestions AS String
> > DIM strWrong AS String
> >
> > IF countCorrect > 1 THEN
> >     strQuestions = "questions"
> > ELSE
> >     strQuestions = "question"
> > END IF
> >
> > IF countWrong > 1 THEN
> >     strWrong = "questions"
> > ELSE
> >     strWrong = "question"
> > END IF
> >
> >
> >
> > Neil
> >
> >
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real users.
> > Discover which products truly live up to the hype. Start reading now.
> > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list