say( __VERSION__ ) ?

Started by EugeneP, July 28, 2010, 09:09:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

EugeneP

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 ?

SplinterGU

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
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

EugeneP

Yes, it would be more useful if it were defined as "1.0.0" not 1.0.0 :)

SplinterGU

yes, but not... I want perform comparations like if __VERSION__ < 1.0
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

EugeneP

My original intention was showing bgdc/bgdi version in application to simplify bug reporting. Any solution will good for me.

SplinterGU

#5
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)
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

SplinterGU

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!
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

EugeneP


SplinterGU

svn was updated yesterday, if you can build binaries, you can do it.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

FreeYourMind

It is posible to determine the version of the release, to do a game working only with a specific release/version ?

SplinterGU

you now have the new version for download with this fix.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2