< Futurebasic < Language < Reference

COMPILERVERSION function

COMPILERVERSION

Function

✔ Appearance ✔ Standard ✔ Console

Syntax

versionNum& = COMPILERVERSION

Description

This function returns the current version of the compiler. The number is internally set before each compiler is shipped. The purpose of this function is to determine whether or not a specific functionality is present before a particular command is executed.

If, for example, you wanted to invoke a routine that was not added to the compiler until version 3 release 2, you would check the version as follows:

LONG IF COMPILERVERSION < 0x03020000
  PRINT "You need a newer compiler to run this."
XELSE
  REM new operation goes here.
END IF

The COMPILERVERSION function always returns a long word which is formatted as follows:

Byte 1 = Version number
Byte 2 = Release number
Byte 3 = Revision Number
Byte 4 = Fix

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.