Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SUBs
#1
I have some questions about QB...

1. How do I put my SUBs in a seperate file from the main program?
2. What's the difference between m = 7 and m = 7%?
Reply
#2
1. What do you mean? Sorta like a library? Or...

2. I believe what you are looking for is: m = 7 or m% = 7,.
In which case, With m = 7, M is a Single-Precision variable... With m% = 7, M is an integer variable...

A single-precision can be a number with floating points,. eg: 7.4, 7.5, 7.6, etc..

A integer can only be a whole number eg: 5, 6, 7, 8, 9, etc...


:wink:
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#3
Quote:I have some questions about QB...

1. How do I put my SUBs in a seperate file from the main program?

If you simply want to put them into a different source file, there are a number of ways to do that.

1. While running the QB environment, select "create file" from the File menu (or "load file" is you want to move your sub to a file you already have. Name the file and select "Module" from the options.
Now, if you hit F2 or select SUBS from the View menu, you'll see the list of your subs organized by source file. Highlight the sub you want to move, then click on the move button. This will bring up a list of the source files you have loaded. Select the file you want to move your sub to and you're done.

OR

2. Make sure your source file is saved as a text file. Open a text editor and cut and paste your subs from one file to the other.
Reply
#4
Don't forget to do the following if you use the subs in a seperate text file:

Code:
REM $INCLUDE: 'path/to/subfile.ext'
Ensure you use single quotes when using $INCLUDE.

>anarky
Screwing with your reality since 1998.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)