Forums : Feedback Forum

Dear Open Hub Users,

We’re excited to announce that we will be moving the Open Hub Forum to https://community.synopsys.com/s/black-duck-open-hub. Beginning immediately, users can head over, register, get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.


On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at [email protected]

Ohloh indentifies FreeBASIC code as Visual Basic

Hello Forum!

First I'll like to congrats ohloh team to put this great web application with stadistical & historical information about open source developments.

I summited two projects: Testly and ServiceFB, both written in FreeBASIC from groundup.

After waiting to enlistements, Ohloh identifies its code as Visual Basic, and also it didn't count into the totals comments puts into .bi files (these are basic include files used by freebasic to import definitions).

That will be a good improvement in code recognition.

Anyway, I won the category for best commented code in Visual Basic Language ;-)

Great Work! (keep it going!)

Luis

luislavena about 17 years ago
 

Hi luislavena,

Thanks for the compliments - they are sincerely appreciated.

Your observations are valid - and I am very motivated to fix them. I don't have a lot of experience with BASIC. Could you help me understand how I could fix these 2 problems?

.bas files: We currently identify .bas files as visual basic. You correctly point out that this isn't always true. My first question: is there a way to distinguish VB from FreeBasic just from syntax? If not, should we simply call those files as Basic?

.bi files: This problem is somewhat easier - we just don't recognize these at all at this point. However - the previous question still applies - should we attribute them as FreeBasic or Basic?

These changes should be relatively simple for us to make - looking forward to your feedback. Thanks!

-jay

Jason Allen about 17 years ago
 

Thank you Jay for your reply.

Basically (no pun intended), Visual Basic code have besides .frm (Forms), .cls (Classes) and .bas (Modules), a fourth file with extension .vbp (Visual Basic Project).

Anyway, all these files (except .vbp which is a INI on-steroids), all start with something like this:

.frm:
VERSION 5.00

Where 5.00 could be also 4.00 in case of Visual Basic 5 or previous versions.

.cls:
VERSION 1.0 CLASS

The CLASS part is important, since is the only thing that diff it from Forms.

.bas:
Attribute VB_Name = Something

The part after = sign could be omitted, since that will change from module to module. But all the modules start with the same line.

However - the previous question still applies - should we attribute them as FreeBasic or Basic?

Should be attributed to FreeBASIC, since is the only compiler that refers to them with preprocessor directives (#include). FreeBASIC Wiki

Again, thank you for your reply.

Luis

luislavena about 17 years ago
 

Oh, also note that I spelled FreeBASIC, since BASIC is already an acronym and not the 'basic' word.

luislavena about 17 years ago
 

Thanks Luis,

If I understand correctly:

.frm: always attribute to Visual Basic

.cls: always attribute to Visual Basic

.bi: always attribute to FreeBASIC

.bas: attribute to FreeBASIC unless it contains Attribute VB_Name = Something.

Does this sound right?

Jason Allen about 17 years ago
 

Yeah Jason,

That sounds exactly right! :-)

luislavena about 17 years ago
 

Jason,

Bumping this got no answer from you and statistics still list as Visual Basic :-P

luislavena about 17 years ago