Hi Nifrabar,
The function you want is strtran()
for example:
MyString = strtran("This is my special string", "special")
? MyString && This is my string
Hi FoxTeam1,
For starters Mod(60000000000000001/23) is an invalid function call. The mod function takes 2 parameters something like Mod(60000000000000001, 23).
Secondly the mod() function returns the remainder of a division not the result of a division.
For example the result of...
Hi Borsker,
To replace 2 spaces with 1 space use this:
REPLACE ALL cField WITH CHRTRAN(cField, space(2), space(1))
I think this is what you want,
Shardlow.
PW try this:
local lcPlace
local lcAddr
local a
for a 1 to 10
lcPlace = "Place" + transform(a)
lcAddr = "Addr" + transform(a)
if not empty(Temp2.&lcAddr)
replace &lcPlace with Temp2.&lcAddr in Temp1
endif
endfor
Goodluck,
Shardlow
Hi ewachs2,
You wrote:
"I believe your concern about the GO BOTTOM statement is avoided by the SEEK statement between the SET EXACT statements."
Based on your sample code, the SEEK statement would just return the record pointer to the last record in the parent table. I am of course assuming...
Hi ewachs2,
Your program listing above is great - but it has a few flaws, unfortunately they may have nothing to do with your problem and are probably just an oversight.
The child table in your sample code doesn't have an order set, so the relationship won't work.
Due to the "go bottom", the...
Hi Jimstarr,
I agree with MikeLewis that it is probably something to do with your configuration. However I think it is your Windows configuration.
You posted that "Æ" becomes "?"; "Æ" is a unicode character and when ? is printed in VFP it means that VFP didn’t know how to convert this...
Hi Nifrabar,
I don't think you can return an array via the return command.
What I would do is to declare the array in your main program and then pass it to CloseProjects() as a parameter.
At the moment when you execute the line RETURN laProjects it will just return the 1st element in the array...
Hi Louis,
Make sure there isn't a table in the current work area with a column called Par4. Otherwise the value in the table will be used over the variable.
Good luck,
Shardlow.
Irabyy,
You are of course right on both points, but that was just the way the company I worked for wanted their code to be structured. All variables and arrays had to be declared and passed to whatever method used them in the manner I have done above. This provided consistency throughout the...
I like to make all my variables LOCAL except for arrays which I declare as PRIVATE. This is for scoping reasons as I find arrays don't pass very well, as in my example below.
The 2nd time This.ArrayTest() is called it crashes as the local array is out of scope.
DEFINE CLASS TestClass AS...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.