GLBasic forum

Main forum => Bug Reports => Topic started by: gregbug on 2010-Jul-04

Title: Folding error with functions...
Post by: gregbug on 2010-Jul-04
ok.
i'm back to convert my libs with v8.006 beta...  =D

I think that i found "the bug"in glbasic that is going me crazy for a few days ...
is related to folding and unfolding functions....

try this...

Code (glbasic) Select

FUNCTION test:




ENDFUNCTION

GLOBAL t = 1



now "close" the function and (f5) compile... all is ok ...

now try this... (add some comments)

Code (glbasic) Select

  FUNCTION test:

// some innocent comment here.


  ENDFUNCTION


now "close" the function and try to compile (f5)

and... tada!!!!

Code (glbasic) Select

_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.6.972 SN:ac0044df - 3D, NET
Wordcount:0 commands
compiling:
C:\Users\Gianluca\AppData\Local\Temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::test()':
C:\Users\Gianluca\AppData\Local\Temp\glbasic\gpc_temp0.cpp:74: error: a function-definition is not allowed here before '{' token
C:\Users\Gianluca\AppData\Local\Temp\glbasic\gpc_temp0.cpp:81: error: a function-definition is not allowed here before '{' token
C:\Users\Gianluca\AppData\Local\Temp\glbasic\gpc_temp0.cpp: At global scope:
C:\Users\Gianluca\AppData\Local\Temp\glbasic\gpc_temp0.cpp:94: error: expected `}' at end of input
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 1.1 sec. Time: 00:56
Build: 0 succeeded.


:rant: :rant: :rant: :rant: :rant:

it seems that if you add some comments inside a function then "close" the function and compile the compiler don't like it!!!

...  :'(

and... when will be possible to compile for iphone with the extended type (functions inside a type) ?


thanks...

Gianluca. (ps: sorry for the bad translation!!!)
CIAO!
Title: Re: Folding error with functions...
Post by: MrTAToad on 2010-Jul-04
Yes, both are valid problems :)
Title: Re: Folding error with functions...
Post by: gregbug on 2010-Jul-09
No news about the two problems reported?  ::)
(folding and iphone compile)

thanks!  :happy:
Title: Re: Folding error with functions...
Post by: MrTAToad on 2010-Jul-10
iPhone compiling with extended types should work in V8.036

But code folding still needs to be fixed.
Title: Re: Folding error with functions...
Post by: gregbug on 2010-Jul-10
Quote from: MrTAToad on 2010-Jul-10
iPhone compiling with extended types should work in V8.036

But code folding still needs to be fixed.

i hope 8.036 will be out soon... just want try my lib (with extended type) on the iphone!  =D
Title: Re: Folding error with functions...
Post by: MrTAToad on 2010-Jul-10
Its been out a few days - if you have the latest beta...
Title: Re: Folding error with functions...
Post by: gregbug on 2010-Jul-10
Quote from: MrTAToad on 2010-Jul-10
Its been out a few days - if you have the latest beta...

downloaded from first post but it's 8.006!  :o (from announcements beta v8)
Title: Re: Folding error with functions...
Post by: MrTAToad on 2010-Jul-10
Thats right!  Just do an Internet Update
Title: Re: Folding error with functions...
Post by: gregbug on 2010-Jul-10
Quote from: MrTAToad on 2010-Jul-10
Thats right!  Just do an Internet Update

doh!  =D

ops i tried same days ago!!! (disabled check daily)
...
i feel like my avatar!!
sorry ;)

and thanks!
Title: Re: Folding error with functions...
Post by: Schranz0r on 2010-Jul-11
Quote from: gregbug on 2010-Jul-10
doh!  =D
i feel like my avatar!!
sorry ;)

xD ROFL