HomeForum
Welcome, Guest

Pascal Code in Calculation properties
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Pascal Code in Calculation properties

Pascal Code in Calculation properties 10 months ago #3248

  • SteveK
  • OFFLINE
  • Junior Boarder
  • Posts: 32
  • Karma: 0
Mike

I need your help again.

I do not have much practice in pascal code. I am developing the pascal code and is not working. Where is wrong? See code below.

Steve

var
iLenFind, count, iPos: integer;
sSource, stFind, stReplace, sFind, sReplace, sString, sOutput: string;
begin
sSource := Copy('[F001]', 25, 26);
stFind := 'ÁÀÃÂÉÊÈÍÌÓÔÕÒÚÙÇáàãâéêèíìóôõòúùç';
stReplace := 'AAAAEEEIIOOOOUUCaaaaeeeiioooouuc';
For count := 1 to 32 do
iLenFind := Length(sFind);
sString := sSource; sFind := Copy(stFind, count, 1); sReplace := Copy(stReplace, count, 1);
repeat
iPos := Pos(sFind, sString);
if iPos > 0 then
begin
sOutput := Copy(sString, 1, iPos - 1) + sReplace;
sOutput := sOutput + Copy(sString, iPos + Length(sFind), Length(sString) - iPos + Length(sFind));
sString := sOutput;
sSource := sString; end;
until iPos = 0;
Result := sString;
end;

Re: Pascal Code in Calculation properties 10 months ago #3249

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2182
  • Karma: 12
I do not understand what are trying to achieve

This one does not make any sense

For count := 1 to 32 do
iLenFind := Length(sFind);

May be the "begin end" part is missing?

Mike
  • Page:
  • 1
Time to create page: 0.15 seconds

Testimonials

Bye the way….. Your software rocks big time. This is the easiest way I have ever found to deal with disparate databases!!!!!!!!!!!!!!!!!!!!

George Martin

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top