Posts: 3
Threads: 2
Joined: Feb 2006
i am a newbie on qbasic programing.Can any of you help me on this question.
Write a program segment that prompts the user to enter a checking account balance. use a library function to display a message stating whether the account is overdrawn.
What is a library function????
Posts: 2,404
Threads: 153
Joined: Jan 2005
I detect homework?... Anyway, put it this way:
A library is a external file with funtions that do tasks outside the range of the defualt statements in a given laguage,. Or it will do the same task, just faster or better.... Given it's a good lib....
A library function (As discribed by your example question) would be the call used in the program to use the funtion in the lib.... e.g.
glEnable (Flag)
Is a function from a OpenGL lib to enable options for other parts of the lib,. Different libs have different things they do,.
Hope that gives a lil insite to your question.. =)
Kevin (
x.t.r.GRAPHICS)
Posts: 3,616
Threads: 287
Joined: Jan 2003
However, technically any intrinsic QB function is a library function.
Although you don't need a function to work that out. Seems all you have to do is test if the account balance is negative or not.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 3
Threads: 2
Joined: Feb 2006
Quote:I detect homework?... Anyway, put it this way:
A library is a external file with funtions that do tasks outside the range of the defualt statements in a given laguage,. Or it will do the same task, just faster or better.... Given it's a good lib....
A library function (As discribed by your example question) would be the call used in the program to use the funtion in the lib.... e.g.
glEnable (Flag)
Is a function from a OpenGL lib to enable options for other parts of the lib,. Different libs have different things they do,.
Hope that gives a lil insite to your question.. =)
yes, it's homework...but i still dun get what are you talking about....
..i just want to know how to do it
Posts: 2,404
Threads: 153
Joined: Jan 2005
Oh,. I get it,. never thought of it like that before...
Going by Zack's reply, you need to use something like this:
Code:
FUNCTION funcname (parameter1, parameter2,..)
'Code Here
END FUNCTION
Then to make the function work you just call it... Read up on this here:
http://qbasicnews.com/qboho/qckfunction.shtml
:wink:
Kevin (
x.t.r.GRAPHICS)
Posts: 684
Threads: 64
Joined: May 2004
Quote:Rattrapmax6 Wrote:I detect homework?... Anyway, put it this way:
A library is a external file with funtions that do tasks outside the range of the defualt statements in a given laguage,. Or it will do the same task, just faster or better.... Given it's a good lib....
A library function (As discribed by your example question) would be the call used in the program to use the funtion in the lib.... e.g.
glEnable (Flag)
Is a function from a OpenGL lib to enable options for other parts of the lib,. Different libs have different things they do,.
Hope that gives a lil insite to your question.. =)
yes, it's homework...but i still dun get what are you talking about.... ..i just want to know how to do it
There is a policy here that if you have homework, you must give us some code to show that you have at least tried the problem yourself. As such, we cannot, and will not, be able to just show you how to do it. If this is homework, and you were paying attention in class, then you should be able to at least start making the program.
quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]