PureBasic 4.00 - Beta 6

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
helpy
Enthusiast
Enthusiast
Posts: 552
Joined: Sat Jun 28, 2003 12:01 am

Post 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
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post 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
User avatar
jqn
User
User
Posts: 97
Joined: Fri Oct 31, 2003 3:04 pm

Post 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
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post 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
:lol:


Did you bother to read my post above?
User avatar
jqn
User
User
Posts: 97
Joined: Fri Oct 31, 2003 3:04 pm

Post 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
User avatar
oakvalley
User
User
Posts: 77
Joined: Sun Aug 08, 2004 6:34 pm
Location: Norway
Contact:

[PB400B6] Variable already declared with a different scope:.

Post 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.
Regards Stone Oakvalley
Currently @ PB 5.70
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Re: [PB400B6] Variable already declared with a different sco

Post 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.
User avatar
oakvalley
User
User
Posts: 77
Joined: Sun Aug 08, 2004 6:34 pm
Location: Norway
Contact:

Post by oakvalley »

Yes, thanks! That was the problem. Just little bit confused with the
way PB4.0 behaves.. But getting a grip now.
Regards Stone Oakvalley
Currently @ PB 5.70
Post Reply