Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Rachel Goatley
  Where is Rachel Goatley?
 Fareham
 United Kingdom
 Rachel Goatley
 Tags
Subject: Problems with macro substitution
Thread ID: 286226 Message ID: 286226 # Views: 90 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Errors & Debugging
Date: Wednesday, December 1, 2010 2:03:37 PM         
   


Hi All,

This is my first post and I am really hoping someone may be able to help!

For the last couple of weeks I have been having code failing in places that have not changed for years! My last successful build with no errors was on the 28th October then since 2nd November I have had to make changes just to get a working release.

Every problem I am having seems to relate to macro substitutions. My first hunch was to look at windows/microsoft updates to see if something had affected the interpretation of the & character. Although I did find one .NET update installed on 1st Novemner I have removed this (and interestingly it asked me to close VFP in order to remove it?!?!) but this has made no difference. I have then gone on to remove all updates installed since October to no avail.

Any time I now make a change to a particular prg and then try to run it or build and exe I get errors :-(

One of the errors I had is when using FILE(). Our code was IF FILE('&gcStopFile') where gcStopFile = "X:\FolderName\Stop.txt" and this has been in place for approx 2 years. Suddenly when built into an exe this line started failing with error "Command contains unrecognised phrase or keyword". I have had to change every occurance of this line to IF FILE(gcStopFile) in order to get this to work. I only changed a very minor line of code at around line 2500 and every occurance started causing errors (starting with line 518). Interestingly the line FILE('&gcStopFile') evaluates correctly in the command window and debugger but when left to run it will error.

Then, today, I made another very minor change quite a way down in the prg today and now am getting a "Variable ARRIVAL_DATEƉ" is not found" error when running the following line: -
SCAN FOR csrFlightLinks.Flight_Series_Id = &lcArrivalsTable..Flight_Series_Id ;
AND csrFlightLinks.Opposite_Flight_Series_Id = &lcArrivalsTable..Opposite_Flight_Series_Id ;
AND csrFlightLinks.Duration = &lcArrivalsTable..Duration ;
AND csrFlightLinks.Arrival_Date = &lcArrivalsTable..Arrival_Date

This is driving me mad!!! Has anybody seen anything else similar? Can anybody give me some more things to try to fix this problem? Both of our development machines are now having the same problem and short of a complete rewrite removing the use of macro substitutions I am totally stuck :-(

Hopefully this all makes!!

The development pc's are running Windows XP SP2 and VFP9 SP2

ENTIRE THREAD

Problems with macro substitution Posted by Rachel Goatley @ 12/1/2010 2:03:37 PM
RE: Problems with macro substitution Posted by Yuri Rubinov @ 12/1/2010 3:01:31 PM
RE: Problems with macro substitution Posted by Mike Yearwood @ 12/1/2010 8:43:55 PM
RE: Problems with macro substitution Posted by Yuri Rubinov @ 12/1/2010 9:35:52 PM
RE: Problems with macro substitution Posted by Mike Yearwood @ 12/2/2010 8:28:24 PM
RE: Problems with macro substitution Posted by Martin Krivka @ 12/1/2010 4:59:40 PM
RE: Problems with macro substitution Posted by Rachel Goatley @ 12/1/2010 5:39:11 PM
RE: Problems with macro substitution Posted by Martin Krivka @ 12/1/2010 5:57:07 PM
RE: Problems with macro substitution Posted by Rachel Goatley @ 12/2/2010 10:47:00 AM
RE: Problems with macro substitution Posted by Yuri Rubinov @ 12/1/2010 7:26:09 PM
RE: Problems with macro substitution Posted by Greg Green @ 12/1/2010 7:35:55 PM
RE: Problems with macro substitution Posted by Mike Yearwood @ 12/1/2010 8:48:17 PM
RE: Problems with macro substitution Posted by Jon Goad @ 12/1/2010 10:40:48 PM
RE: Problems with macro substitution Posted by Christian Tabligan @ 12/2/2010 2:10:30 AM
RE: Problems with macro substitution Posted by Jun Tangunan @ 12/2/2010 3:34:24 AM
RE: Problems with macro substitution Posted by Samir H. @ 12/2/2010 4:20:01 AM
RE: Problems with macro substitution Posted by tushar @ 12/2/2010 5:45:15 AM
RE: Problems with macro substitution Posted by dharu vauh @ 12/2/2010 10:16:47 AM
RE: Problems with macro substitution Posted by Martin Krivka @ 12/2/2010 10:30:28 AM
RE: Problems with macro substitution Posted by Rachel Goatley @ 12/2/2010 10:56:38 AM
RE: Problems with macro substitution Posted by Mike Yearwood @ 12/2/2010 8:33:09 PM
RE: Problems with macro substitution Posted by Christian Tabligan @ 12/3/2010 2:24:10 AM
RE: Problems with macro substitution Posted by Mike Yearwood @ 12/3/2010 2:55:04 AM
RE: Problems with macro substitution Posted by Christian Tabligan @ 12/3/2010 6:25:08 AM
RE: Problems with macro substitution Posted by Rachel Goatley @ 12/7/2010 2:31:16 PM
RE: Problems with macro substitution Posted by Martin Krivka @ 12/7/2010 3:30:57 PM
RE: Problems with macro substitution Posted by Rachel Goatley @ 12/7/2010 4:52:10 PM
RE: Problems with macro substitution Posted by Mike Yearwood @ 12/7/2010 10:57:22 PM
RE: Problems with macro substitution Posted by Jun Tangunan @ 12/8/2010 12:42:17 AM
RE: Problems with macro substitution Posted by Martin Krivka @ 12/8/2010 8:41:25 AM
RE: Problems with macro substitution Posted by Samir H. @ 12/7/2010 3:38:30 PM
RE: Problems with macro substitution Posted by Rachel Goatley @ 12/7/2010 4:51:04 PM
RE: Problems with macro substitution Posted by Samir H. @ 12/7/2010 5:46:33 PM
RE: Problems with macro substitution Posted by Jun Tangunan @ 12/8/2010 12:59:05 AM
RE: Problems with macro substitution Posted by Rachel Goatley @ 12/8/2010 10:59:12 AM
RE: Problems with macro substitution Posted by Mike Yearwood @ 12/8/2010 7:09:26 PM
RE: Problems with macro substitution Posted by Samir H. @ 12/8/2010 7:35:57 PM
RE: Problems with macro substitution Posted by Mike Yearwood @ 12/8/2010 8:02:29 PM
RE: Problems with macro substitution Posted by Tamar Granor @ 12/8/2010 10:37:17 PM