Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

make library

Status
Not open for further replies.

fancom

Programmer
Feb 7, 2001
46
TR
hi again..
sorry couldn't get the idea about the making libs..

i've a sample code:

start:
screen 0
width 80
cls

input "input sine to find alfa";sine
if abs(sine) > 1 then goto start

arcsine:
myangle=0
g=abs(sine)
if g=0 then myangle=0 : goto showresult
if g=1 then myangle=90 : goto showresult
c=0
while sine(c) < g
c=c+.1
wend

myangle=c


showresult:
if sine < 0 then myangle=myangle+180
? "sin(";myangle;") = ";sine

end

anyway....... the question is how can i make a library and recall my arcsine sub ?(this is not a sub here but i use it as a sub in my sources)
can you please answer it step by step because of my bad english..
i've tons of sub codes like arcsine and i want to put them in my library and just recall when i need.. please help !







 
SORRY FOR WHILE SIN(C) ..... IT SHOULD BE WHILE SIN(C*PI)
 
(Requires QB45)
Step 1: Run>Make Library...
Step 2: Load QB with the Library... QB /L MyLib

You might have to declare your library functions in a program before calling them...

Good Luck,
Josh

Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
Sorry, QB45 is short for Quick Basic 4.5 (old habbits die hard)

Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
To make a library, do your program without main module code.
I.E. only subs and/or functions.

Save it.

select Run menu, choose make library, fill in the name of
the library and press enter.

This is the easiest way (making a library from a basic
program).

Then exit QuickBasic and restart quickbasic using /L librname

where librname is the name of your library.

Declare the subs/functions of you library in the new program
(or make an inc file with the declarations in it and use
the $include metastatement to include it.)

you should then be able to access the subs/functions of you library in any program you make (as long as the lib is loaded i.e. /L librname is used to start quickbasic)

It does require QuickBasic as mentioned in earlier posts,
Qbasic does not support libraries.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top