Bennu Game Development

English Forums => Helpdesk => Topic started by: EugeneP on July 28, 2010, 09:09:07 AM

Title: say( __VERSION__ ) ?
Post by: EugeneP on July 28, 2010, 09:09:07 AM
This code cannot be compiled (BGDC 1.0.0 (Jul  2 2009 17:50:17)):

[code language="bennu"]import "mod_say"

begin
#ifdef __VERSION__
    say( __VERSION__  );
#endif
end
[/code]

Is it possible to use __VERSION__ constant anywhere except #ifdef ?
Title: Re: say( __VERSION__ ) ?
Post by: SplinterGU on July 28, 2010, 11:49:19 PM
ya veo, algo que no tuve en cuenta, version es 1.0.0, y no es string, es un numero, pero un numero con 2 decimales no puede ser posible, voy a tener que cambiar eso y quitar el utlimo .0
Title: Re: say( __VERSION__ ) ?
Post by: EugeneP on July 29, 2010, 04:53:28 AM
Yes, it would be more useful if it were defined as "1.0.0" not 1.0.0 :)
Title: Re: say( __VERSION__ ) ?
Post by: SplinterGU on July 29, 2010, 06:24:28 AM
yes, but not... I want perform comparations like if __VERSION__ < 1.0
Title: Re: say( __VERSION__ ) ?
Post by: EugeneP on July 29, 2010, 06:41:47 AM
My original intention was showing bgdc/bgdi version in application to simplify bug reporting. Any solution will good for me.
Title: Re: say( __VERSION__ ) ?
Post by: SplinterGU on July 29, 2010, 07:34:46 AM
In the next version this will be fixed.


import "mod_say"

begin
    say(__VERSION__);
    say(COMPILER_VERSION);
    say(__BGD__);
    say(__BGD_MINOR__);
    say(__BGD_PATCHLEVEL__);
end


output:
Quote
1.0.0
1.0.0
1
0
0

__VERSION__        (string)
COMPILER_VERSION    (string)
__BGD__            (int)
__BGD_MINOR__       (int)
__BGD_PATCHLEVEL__  (int)
Title: Re: say( __VERSION__ ) ?
Post by: SplinterGU on July 29, 2010, 07:52:32 AM
Quote from: EugeneP on July 28, 2010, 09:09:07 AM
This code cannot be compiled (BGDC 1.0.0 (Jul  2 2009 17:50:17)):

[code language="bennu"]import "mod_say"

begin
#ifdef __VERSION__
    say( __VERSION__  );
#endif
end
[/code]

Is it possible to use __VERSION__ constant anywhere except #ifdef ?


karma for you!
Title: Re: say( __VERSION__ ) ?
Post by: EugeneP on July 29, 2010, 09:08:18 AM
Thanks and thanks.
Title: Re: say( __VERSION__ ) ?
Post by: SplinterGU on July 29, 2010, 04:12:52 PM
svn was updated yesterday, if you can build binaries, you can do it.
Title: Re: say( __VERSION__ ) ?
Post by: FreeYourMind on July 29, 2010, 05:52:30 PM
It is posible to determine the version of the release, to do a game working only with a specific release/version ?
Title: Re: say( __VERSION__ ) ?
Post by: SplinterGU on August 06, 2010, 12:44:29 PM
you now have the new version for download with this fix.