Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
#Include
Message
De
23/04/2007 14:24:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01218718
Message ID:
01219030
Vues:
14
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform