Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modul to Modul subrutine results
#1
I have just broken a long prog. into 2 modules with a Globals.bi part for the declarations etc. Now variables read in a subroutin in one module is not known in the subroutins in the second module??

A.Sadjadian
Reply
#2
I tried a program that relies on using seperate .bas files once, the thing I did was save everything on a file and have the new program read that file right at the start....

I also think there is a way to attach files to your .bas program, those files should show up on the F2 screen (the one that shows all the subs) and should be listed as followed.

FILENAME.BAS
- SUB1
- SUB2
... etc.

Anyway, i'm not sure if they share global variables or not still. I think you have to use the merge feature or something to get the files to merge with it.

Also, maybe if you use the #INCLUDE feature with the added file it could work :/
- Smoke_Rune
Reply
#3
What you need is to use COMMON SHARED to make variables global throughout your project. They should be at the top of each module and in the same order for each one. Look it up in the qb help file. Smile
igitalblackie.com - Done! Smile Ask about our hosting Wink

-Goddess of the of the No More Religion Threads movement Smile
Reply
#4
There's a tutorial on it in the FAQ.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)