Page 3 of 3
Posted: Mon Mar 13, 2006 11:59 am
by helpy
This works:
Code: Select all
OpenConsole()
a.s=input()
If a = "END"
END
Endif
END
Instead of "if" write "If" and instead of "endif" write "Endif" ... then the compiler works!
cu, helpy
Posted: Mon Mar 13, 2006 12:09 pm
by Berikco
jqn wrote:Hey,
SOME PROBLEM WITH PBCOMPILER.EXE??
I'm always using the batch compiler PBcompiler.exe, but in Beta 6 it says "Syntax error!" on every "if":
Code: Select all
OpenConsole()
a.s=input()
if a = "END"
END
endif
END
It returns:
Code: Select all
PBCompiler "C:\test.PB" /exe "C:\test.exe"
******************************************
PureBasic v4.00 - Beta 6 (Windows - x86)
******************************************
Compiling C:\test.PB
Loading external libraries...
Starting compilation...
Error: Line 3 - Syntax error!
JOAQUIN
This lowercase bug is already reported in Bugs forum....and fixed for next beta
http://www.purebasic.fr/english/viewtop ... highlight=
Please search the bugs forum before posting a new bug report......and post bugs report in the correct forum
Posted: Mon Mar 13, 2006 12:16 pm
by jqn
Instead of "if" write "If" and instead of "endif" write "Endif" ... then the compiler works!
It's TRUE

.thx
helpy
But, interactive compiler on PureBasic.exe ignores letter case.
Fred: I need to change now ALL my programs?. It's a lot of work.
JOAQUIN
Posted: Mon Mar 13, 2006 12:18 pm
by Berikco
jqn wrote:Instead of "if" write "If" and instead of "endif" write "Endif" ... then the compiler works!
It's TRUE

.thx
helpy
But, interactive compiler on PureBasic.exe ignores letter case.
Fred: I need to change now ALL my programs?. It's a lot of work.
JOAQUIN
Did you bother to read my post above?
Posted: Mon Mar 13, 2006 12:33 pm
by jqn
Did you bother to read my post above?
sorry,
Berikco, your post has been released when I'm writing mine.
(I need a lot of time to write in english).
Please search the bugs forum before posting a new bug report..
In my initial posting I ignored if this is an error, and also its reason.
sorry, again.
JOAQUIN
[PB400B6] Variable already declared with a different scope:.
Posted: Mon Mar 13, 2006 10:46 pm
by oakvalley
I just get these error messages for variables that are defined in the
start of the code, like
Global Power_Factor
Global Turbo_Power
This was no problem in PB400B4...did not have the chance to test B5, Fred was too quick.
I also had some problem with DIM, but found out that it should be
GLOBAL DIM instead, found this tip in the forums...but what has happended to this Global Power_Factor thing now?
Some change in the way purebasic behaves or?
The variables are needed outside and inside procedures...
Please help.
Re: [PB400B6] Variable already declared with a different sco
Posted: Tue Mar 14, 2006 11:02 am
by Berikco
oakvalley wrote:I just get these error messages for variables that are defined in the
start of the code, like
Global Power_Factor
Global Turbo_Power
This was no problem in PB400B4...did not have the chance to test B5, Fred was too quick.
I also had some problem with DIM, but found out that it should be
GLOBAL DIM instead, found this tip in the forums...but what has happended to this Global Power_Factor thing now?
Some change in the way purebasic behaves or?
The variables are needed outside and inside procedures...
Please help.
You have a line with Power_Factor = value somewhere before the Global Power_Factor.
So the Variable is already declared.
PS, these questions belong in coding questions, not in announcements.
Posted: Thu Mar 16, 2006 10:12 pm
by oakvalley
Yes, thanks! That was the problem. Just little bit confused with the
way PB4.0 behaves.. But getting a grip now.