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
Brandon
Coder
Posts: 47
Joined: Sat Nov 19, 2005 9:24 pm
Location: NY
Contact:

Libary Variables

Post by Brandon »

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
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Dunno bout that

Post by burger2227 »

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.

Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Post Reply