Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling Tables
Message
 
To
24/01/2004 13:46:32
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00868831
Message ID:
00871536
Views:
19
Hi Mike,

Once again, thanks for all your help. I have looked at the links you gave me and the one on when to use the “m” is completely clear – or I think so?? The discussion on Marcos is less so. Let me briefly explain the programs I must convert to VFP from Clipper which will show why I keep coming back to Macros and Computations in Core memory.

The programs basically deal with economic “modeling” using time series analysis. I have a number of raw numerical data tables, which are sequenced by date in ascending order. What my models allow me to do is to form any hypothesis (for which there is data), then test it to see what results I get. Once I build a specific hypothesis and start it running, all user interaction ceases. The program extracts the needed fields in the numerical data tables and performs numerical calculations on them (add, subtract, divide, etc.) to produce a series of variables. Finally, the model uses these variables created to test the hypothesis over time e.g., if this and that are true on a given date then take this action. So:

1.There are huge amounts of calculations to convert raw data into the variables, each requiring a read & write to tables. To run my calculations in Clipper using hard drive read & writes took forever, until I found how to set up a RAM D:drive where all these took place in core memory. VFP doesn’t support a RAM capability. But my reading led me to believe that by setting “foreground & background” buffer size, I could do the same thing with table buffering as long as I created sufficient memory set aside with the SYS(3050) command. According to what I read, this will permit calculations to take place in memory until the end where tableupdate() will write the final table to disk. Is this correct?

2.The requirement to pick many data “fields” from the raw data files, perform extensive calculations on them to create variables and then use these variables to test the hypothesis required extensive use of “indirect” addressing of the names of the needed table fields. This was handled in Clipper through the use of FORNEXT or DO WHILE LOOPS and the “macro substitution with the &” syntax. For example, you could pick the first data field needed assign it to a variable and then parse the raw data tables to find it i.e., if &var = field (fieldnumber), copy its data to a table, then repeat the process assigning the next data field until all data fields needed to construct the variable were assembled in a table. Then you proceeded to the next variable When I tried to substitute the () for the &, VFP didn’t like it and the reference said to AVOID use of the ‘&’. After looking over all the discussion you gave me, my conclusion is to write the code using the ‘&’ syntax and then try using the () or the EVAL() syntax to see if it will work too. If so, use it; if not, use the ‘&’. Is this the correct approach?
Thanks,
Barne
Previous
Reply
Map
View

Click here to load this message in the networking platform