Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
#Include
Message
From
23/04/2007 14:24:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01218718
Message ID:
01219030
Views:
13
>Yes, it does

Header (.H) files and procedure (.PRG) files should be separate, in my opinion. For the sake of maintaining some order.

>What is the difference between to write a include.h file or a PRG file ?
>Sometimes I see #include file.h others I see set procedure to a file.prg

SET PROCEDURE ... makes functions in the file available.

#INCLUDE ... makes the constants, define with the #DEFINE command, available.

A constant is typically a single line, with a definition that might be used in several places in your program. For example, #DEFINE MAXUSERS 5. The concept is somewhat similar to a variable. (I might explain the difference between variables and constants, but only after making sure you understand the difference between constants and functions!)

A function will typically have several commands, that do some specific task. It might also be invoked from several places of your program.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform