Page 1 of 1

QB/FB discriminator

Posted: Sat Oct 25, 2008 6:50 am
by angros47
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!

Posted: Tue Oct 28, 2008 8:55 pm
by sid6.7
seems to work...good job...