Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting Clipper arrays syntax to VFP
Message
De
14/05/1997 11:17:11
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Groupes d'usagers
Divers
Thread ID:
00032143
Message ID:
00032185
Vues:
39
>I am converting an EDI translation routine written in Clipper
>to VFP.
>
>Problem:
>Clipper code contains a lot of inline array assignments.
>example: sgmnt_term := { "'", "…" }
>
>VFP does not seem to like this.
>I get an error like "Unrecognized command verb"

Array handling is one place that Clipper has it hands down over FoxPro. The syntax you are attempting here has no equivalent in FoxPro - the closest you can get is:

DIMENSION laMyArray[3,6] && or whatever size you need
laMyArray = 5

which will assign the value 5 to all members of the array.

Fox arrays can only be two-dimensional at most, and cannot be ragged, as opposed to Clipper, which can support many-dimensioned arrays and ragged arrays. Also, the functions that handle arrays in FoxPro are clumsy, at best.

For its flexibility in many places, such as arrays, Clipper is superior. My personal dream xBase language would combine Clipper's arrays, code blocks, the preprocessor, and near-native compilation with VFP's object orientation, SQL, and (of course) Windows implemetation.

Note that Clipper's code blocks can be approximated with well-designed classes.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform