QB/FB discriminator

The forum for all of your Freebasic needs!

Moderators: Pete, Mods

angros47
Veteran
Posts: 70
Joined: Mon Sep 08, 2008 12:52 pm
Contact:

QB/FB discriminator

Postby 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
sid6.7
Veteran
Posts: 318
Joined: Tue Jun 21, 2005 8:51 am
Location: west USA
Contact:

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

seems to work...good job...


Return to “Freebasic Questions & Answers”

Who is online

Users browsing this forum: No registered users and 1 guest

cron