Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PRIVATE vs Hard-coding cursor name
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
PRIVATE vs Hard-coding cursor name
Divers
Thread ID:
01667233
Message ID:
01667233
Vues:
72
Hi,

I have a function that uses XFRX to convert a report to a PDF format.

The report to be converted to PDF has multiple bands. XFRX handle it fine but the cursor names that are used for the bands have to be in scope inside the MyXFRX() function. And I used local variable. For example:
local  Band1Cursor, Band2Cursor
Band1Cursor = sys(2015)
Band2Cursor = sys(2015)
With the above scenario the MyXFRX function gives an error that variable Band1Cursor does not exist.

The solution - so far - is to either make the variables Private or hard coded. That is, do not use variables but instead use names like CUR_Band1, CUR_band2

Which approach would be a better practice?

TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform