Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting Clipper arrays syntax to VFP
Message
From
14/05/1997 11:17:11
 
 
To
14/05/1997 09:44:01
General information
Forum:
Visual FoxPro
Category:
User groups
Miscellaneous
Thread ID:
00032143
Message ID:
00032185
Views:
37
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform