IonicWind Software

IWBasic => IWB3.x Bug Reports => Resolved Issues => Topic started by: Logman on August 20, 2015, 06:36:38 AM

Title: Spurious Results from __IWVER__ Constant
Post by: Logman on August 20, 2015, 06:36:38 AM
PROBLEM - Not sure of what to make of the return value for the __IWVER__ constant shown in Appendix E of the IWBasic User's Guide.

In the User's Guide go to SEARCH and enter "Appendix E".

Find "E. Special Constants" in the Select Topic window. It will bring up the E. SPECIAL CONSTANTS Topic as follows:

=============================================================
__IWVER__
Returns a number with compiler version. Currently, it does not return anything but TRUE when used in $IFDEF statement.


PRINT "compiler version: 0x", hex$(__IWVER__)

=============================================================

ISUUE:
When I set up __IWVER__ like shown in the following code snippet:


uint iwbasic_version = __IWVER__
istring buffer[80]
...
destination_buffer = "IWBasic Version: 0x" + hex$(__IWVER__)
PRINT buffer
...
destination_buffer = "IWBasic Version: " + str$(__IWVER__)
PRINT buffer
...


The following values are returned:

hex$(__IWVER__) returns 0x2000905
str$(__IWVER__) returns 33556741

I can't make heads or tails out of either of these return values since I'm using IWBasic Compiler Version 3.03. Is the value 33556741 indicating a BUILD version or is it just a random return value? I'm not sure this constant is returning a valid value.

Logman
Title: Re: Spurious Results from __IWVER__ Constant
Post by: LarryMc on August 20, 2015, 10:33:01 AM
actually you've caught a bug in the IDE.
I've assigned the the IDE version to the compiler version also.

the 2000905 you see represents the 2.095 version of the current compiler
Title: Re: Spurious Results from __IWVER__ Constant
Post by: Logman on August 20, 2015, 12:43:42 PM
I thought it represented version 2.095. I am putting the IWBasic version and NASM version at the top of the files I'm developing for the lexer and parser. I am updating both IWBasic and NASM as they are produced and need to know which versions may be causing issues so I can inform the respective teams when I discover problems..

I noticed this anomaly when I created the headers.

Logman