Qbasicnews.com
April 08, 2020, 11:25:44 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: nooby question  (Read 1855 times)
madefromheaven
New Member

Posts: 3


« on: February 06, 2006, 05:54:12 PM »

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?Huh  :cry:  :cry:
Logged
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #1 on: February 06, 2006, 07:41:44 PM »

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.. =)
Logged

Kevin (x.t.r.GRAPHICS)

Zack
*/-\*
*****
Posts: 3974



WWW
« Reply #2 on: February 06, 2006, 09:40:37 PM »

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.
Logged

f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
madefromheaven
New Member

Posts: 3


« Reply #3 on: February 07, 2006, 05:04:51 PM »

Quote from: "Rattrapmax6"
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....   :cry:  :cry:  ..i just want to know how to do it
Logged
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #4 on: February 07, 2006, 05:36:09 PM »

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:
Logged

Kevin (x.t.r.GRAPHICS)

Torahteen
Ancient Guru
****
Posts: 744



« Reply #5 on: February 08, 2006, 12:55:50 AM »

Quote from: "madefromheaven"
Quote from: "Rattrapmax6"
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....   :cry:  :cry:  ..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.
Logged

quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!