Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Problem with $INCLUDE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with $INCLUDE

    Some of the Pb 3.5 programs have the statement "$INCLUDE ....".
    I am new to Powerbasic. The manual does not say a lot about it.
    Ehat do3es it doo and how can I get the sample programs to work with or without this statement.

    ------------------

  • #2
    Keith,

    The $Include metastatement (also known as a compiler directive)is a way of allowing programmers (like you)to organise your work.
    All it means(to the compiler) is look for the file name printed after the $include (current directory is the default) and treat it as if it was part of the main file.
    This way you can put long lists of variable declarations, commonly used routines, and anything else you want to keep separately, but include in the main program.
    It is really just telling powerbasic to copy the contents of the include(d) file into the file where the $include statement is.

    The example programs are in the example folder, while pb.exe is in the currently active folder. This is what is keeping you from compiling the examples. I fought with this myself until I understood what was happening
    So, either move the example(s) you want to compile into the folder where the pb.exe file is. (make sure you get anything referenced in the main file also .pbl or .pbu as well as .inc Or, set up the directories configuration
    so that powerbasic knows where to look for the additional files

    ------------------


    [This message has been edited by Randal Milota (edited September 02, 2000).]

    Comment

    Working...
    X