QB/FB discriminator

The forum for all of your Freebasic needs!

Moderators: Pete, Mods

Post Reply
Posts: 72
Joined: Mon Sep 08, 2008 12:52 pm

QB/FB discriminator

Post by angros47 » Sat Oct 25, 2008 6:50 am

This little piece of code allows to understand if a program has been compiled in FB (-lang QB) or QB.

Code: Select all

Declare Sub TestVersion ()
Dim Shared Version

TestVersion: If Version = 1 Then Print "This is FreeBasic" Else Print "This is Quickbasic"

Sub TestVersion
Version = 1
End Sub

Test it under both compilers!

User avatar
Posts: 318
Joined: Tue Jun 21, 2005 8:51 am
Location: west USA

Post by sid6.7 » Tue Oct 28, 2008 8:55 pm

seems to work...good job...

Post Reply