Purpose of .bas file?

positrom2

Active Member
Licensed User
Longtime User
Hi,
could somebody tell me what the purpose of the .bas file is? Might it be edited to include some subs? In the forum via google I did not find any explanation understandable to me. Somebody gave the hint "it is similar to ... in VisualBasic 10". Not helpful to me....
Regards, positrom2
 

derez

Expert
Licensed User
Longtime User
.bas files are code files, similar to the .b4a files, but the b4a file includes the main activity code while the .bas files hold additional code modules - activities, code, services or classes. The .bas files are compiled together with the main part to form the apk file.
 
Upvote 0

Tom Law

Active Member
Licensed User
Longtime User
Hi Positrom2,

As Derez explained a bas file holds code, no screen fields etc so only subroutines and functions. Routines in the bas file can be declared public I.e. available to all other parts of the program. So if you have a useful routine that you use several times in a program just write it once in the bas file, declare it as public and call it as needed.
 
Upvote 0
Top