April 24, 2024, 06:21:22 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Spurious Results from __IWVER__ Constant

Started by Logman, August 20, 2015, 06:36:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Logman

August 20, 2015, 06:36:38 AM Last Edit: August 20, 2015, 06:38:24 AM by Logman
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
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

LarryMc

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
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Logman

August 20, 2015, 12:43:42 PM #2 Last Edit: August 20, 2015, 12:45:53 PM by Logman
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
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!