Author Topic: V8 beta  (Read 4537 times)

Offline MrTAToad

  • HelpEditors
  • Prof. Inline
  • ****
  • Posts: 1906
  • Its me!
    • View Profile
    • The Un-Map Website
Re: V8 beta
« Reply #150 on: July 28, 2010, 01:15:38 pm »
Hm. Not for me. Can you reproduce that?
Certainly can!

With the following :

Code: [Select]
FUNCTION T%:
INLINE
int a;

if (a=1)
{
}
ENDINLINE
ENDFUNCTION

Fold the function and then re-display it and you'll get :

Code: [Select]
FUNCTION T%:
INLINE
int a;

IF (a=1)
{
}
ENDINLINE
ENDFUNCTION

I haven't been able to get it to do it with just loading a problem, so it may have been a once-off...
GLBasic Command List : Command List Visit My Website Twitter : FishyMcFlipFlop YouTube : My Channel

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *****
  • Posts: 3773
  • O Rly?
    • View Profile
Re: V8 beta
« Reply #151 on: July 28, 2010, 07:50:38 pm »
I dont know if this on your ToDo Gernot, or you can't fix this problem...

Code: [Select]
TYPE TTest
a%;b%
FUNCTION init:

ENDFUNCTION
ENDTYPE


TYPE TSubTest
a%;b%
FUNCTION init:

ENDFUNCTION
ENDTYPE



WHILE TRUE




SHOWSCREEN
WEND
END

ERROR:

Code: [Select]
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.7.019 SN:7513feb7 - 3D, NET
"TypeTest.gbas"(20) error : a sub/fkt is defined twice : init

But i think you know that problem :D
I <3 DGArray's :D

PC:
AMD Phenom II x4 @ 3.6ghz, 4gb Ram, GTX 260 1GB, Windows 7 64Bit

Laptop:
AMD Athlon 64 X2 Dual QL62, 17" WXGA+, 4gb Ram, ATI Mobile Radeon HD 3200 512MB, 250gb HD, Windows Vista 32Bit

Offline Slydog

  • Mr. Drawsprite
  • **
  • Posts: 83
  • KodeSource
    • View Profile
    • KodeSource
Re: V8 beta
« Reply #152 on: July 28, 2010, 08:04:10 pm »
Gernot, I don't know the inner workings of your compile process (or ANY compile process!), but to allow TYPES to use the same function names, like Schranz0r is asking, could you get the compiler to automatically prefix all function names with the type name?

For his example you would rename internally his functions to: TTest_init() and TSubTest_init().
(Like people in the forums suggest you do on your own.)

Of course you would have to determine which actual function to call when you encounter it later on in the source code, by knowing what TYPE it is referring to.
- Yes I can still hear you now, and whoever this is, please stop calling me!

Offline hardyx

  • Mc. Print
  • *
  • Posts: 21
    • View Profile
Re: V8 beta
« Reply #153 on: July 28, 2010, 10:42:23 pm »
@Slydog: I think that C++ do the same way, prefixing the functions with the name of the class of struct. This must be the way.

Gernot, this is an interface bug I think: when you select GP2X in the project options is saved as GP2X-Wiz. When you enter again in the options you see this. Works ok with other platforms.
« Last Edit: July 28, 2010, 11:24:17 pm by hardyx »

Offline Kitty Hello

  • Useless Servant
  • Administrator
  • Prof. Inline
  • *****
  • Posts: 6768
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: V8 beta
« Reply #154 on: July 29, 2010, 09:27:06 am »
Yes, it's on my TODO. It's a bug. Bad one.
DELL Precision M6300: Core 2 Duo 2.20GHz, 2GB ram, NVIDIA Quadro FX 1600M, Vista Business
GLBasic SDK premium, Version: next update (beta)

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *****
  • Posts: 3773
  • O Rly?
    • View Profile
Re: V8 beta
« Reply #155 on: July 29, 2010, 10:59:11 am »
Ah Ok, nice to know  :happy:
I <3 DGArray's :D

PC:
AMD Phenom II x4 @ 3.6ghz, 4gb Ram, GTX 260 1GB, Windows 7 64Bit

Laptop:
AMD Athlon 64 X2 Dual QL62, 17" WXGA+, 4gb Ram, ATI Mobile Radeon HD 3200 512MB, 250gb HD, Windows Vista 32Bit

Offline Kitty Hello

  • Useless Servant
  • Administrator
  • Prof. Inline
  • *****
  • Posts: 6768
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: V8 beta
« Reply #156 on: July 29, 2010, 06:53:35 pm »
DELL Precision M6300: Core 2 Duo 2.20GHz, 2GB ram, NVIDIA Quadro FX 1600M, Vista Business
GLBasic SDK premium, Version: next update (beta)

Offline MrTAToad

  • HelpEditors
  • Prof. Inline
  • ****
  • Posts: 1906
  • Its me!
    • View Profile
    • The Un-Map Website
Re: V8 beta
« Reply #157 on: July 29, 2010, 07:33:31 pm »
Interesting :)

Any chance of having a SPACE$ (or PADSTRING command - create a string of a defined character, x many times) ?  A intergrated decimal to hex (and vice versa).



GLBasic Command List : Command List Visit My Website Twitter : FishyMcFlipFlop YouTube : My Channel

Offline Ocean

  • Prof. Inline
  • *****
  • Posts: 958
  • I'd rather be flying...
    • View Profile
    • Forex Trading Ideas

Offline MrTAToad

  • HelpEditors
  • Prof. Inline
  • ****
  • Posts: 1906
  • Its me!
    • View Profile
    • The Un-Map Website
Re: V8 beta
« Reply #159 on: July 30, 2010, 12:57:09 am »
SPRITE2MEM memory problem seems to be fixed, which is good!
GLBasic Command List : Command List Visit My Website Twitter : FishyMcFlipFlop YouTube : My Channel

Offline MrTAToad

  • HelpEditors
  • Prof. Inline
  • ****
  • Posts: 1906
  • Its me!
    • View Profile
    • The Un-Map Website
Re: V8 beta
« Reply #160 on: August 04, 2010, 06:31:37 pm »
Compound ?IFDEF statements not only execute the code within the ?IFDEF statement, but also any non-valid ones.

For example, :

Code: [Select]
?IFDEF WIN32
?WARNING "Windows"
?ELSE
?IFDEF OSXUNI
?WARNING "Mac"
?ELSE
?WARNING "Here too!"
?ENDIF
?ENDIF

Displays both Windows and Here too!

GLBasic Command List : Command List Visit My Website Twitter : FishyMcFlipFlop YouTube : My Channel

Offline MrTAToad

  • HelpEditors
  • Prof. Inline
  • ****
  • Posts: 1906
  • Its me!
    • View Profile
    • The Un-Map Website
Re: V8 beta
« Reply #161 on: August 06, 2010, 09:41:44 pm »
I notice that if you call a function in an extended type, unless you add self. to it, the compiler generates a

Quote
call to undefined function

error.

However, if you define a standard function (with the same name), the compiler somehow finds the function in the type and calls it (and you dont need to use self to do it).  I presume thats a little buggette :)

And of course, called functions in a type dont turn blue.

This is the code I'm testing it with :

Code: [Select]
TYPE Ta
FUNCTION moo%:
go()
ENDFUNCTION

FUNCTION go%:
DEBUG "Type function\n"
ENDFUNCTION
ENDTYPE

LOCAL a AS Ta

a.moo()
END

FUNCTION go%:
DEBUG "Standard function\n"
ENDFUNCTION

I notice that the  "warning : note : TYPE xxx is not declared" message is still displayed...
« Last Edit: August 07, 2010, 03:40:32 pm by MrTAToad »
GLBasic Command List : Command List Visit My Website Twitter : FishyMcFlipFlop YouTube : My Channel

Offline Quentin

  • Prof. Inline
  • *****
  • Posts: 758
    • View Profile
Re: V8 beta
« Reply #162 on: August 09, 2010, 09:26:59 am »
did anyone realize that with version 8.064 is't now possible to use the same function name in different types ?
Yeah!

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *****
  • Posts: 3773
  • O Rly?
    • View Profile
Re: V8 beta
« Reply #163 on: August 09, 2010, 11:11:16 am »
have do update today :P

WOHOOO ;)
I <3 DGArray's :D

PC:
AMD Phenom II x4 @ 3.6ghz, 4gb Ram, GTX 260 1GB, Windows 7 64Bit

Laptop:
AMD Athlon 64 X2 Dual QL62, 17" WXGA+, 4gb Ram, ATI Mobile Radeon HD 3200 512MB, 250gb HD, Windows Vista 32Bit

Offline MrTAToad

  • HelpEditors
  • Prof. Inline
  • ****
  • Posts: 1906
  • Its me!
    • View Profile
    • The Un-Map Website
Re: V8 beta
« Reply #164 on: August 10, 2010, 05:32:12 pm »
Its coming along very nicely...
GLBasic Command List : Command List Visit My Website Twitter : FishyMcFlipFlop YouTube : My Channel