Libary Variables

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
Posts: 47
Joined: Sat Nov 19, 2005 9:24 pm
Location: NY

Libary Variables

Post by Brandon » Sat Jun 14, 2008 3:57 pm

I made a library, and it has shared variables, but when I use the library I can't use them in my program. So like In the library the Start command loads RESX AND RESY so if I include my library and do "Start: Print RESX , RESY" I get zeros. Is there anyway I can "share" them between the library and the program?

User avatar
Posts: 2419
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Dunno bout that

Post by burger2227 » Wed Jun 18, 2008 6:15 pm

Libraries are used to work with a program's code. Not send values to a program as far as I know. For instance, the QB45 library can work with Interrupt, but it does not tell you anything. It works with values that your program sends to Interrupt.

Libraries are just ways to work with a program procedure. They must be flexible to be used in other programs. You could create some SUBs and create a library. Like a SUB, the values sent determine the answer returned.

Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX :
Get my Q-Basics demonstrator: ...

Post Reply