Page 1 of 1

compile error with TurboDelphi (Expected BEGIN but received END)

Posted: Tue Oct 25, 2016 8:30 am
by Lonesome
Hi,
I am receiving the error "Expected BEGIN but received END at line 33 (33:1)". See screenshot below
I am using Borland Turbo Delphi. (https://archive.org/details/turbodelphi_10).
Does anybody know how to overcome this problem?

Re: compile error with TurboDelphi (Expected BEGIN but received END)

Posted: Wed Oct 26, 2016 6:56 am
by Lonesome
I searched through the forum for others who had the same problem.
I found one topic discussing this issue.
The solution provided there was to put a "Begin" before the last "End."
viewtopic.php?f=9&t=1676&p=3370&hilit=Expected+BEGIN+but+received+END#p3370
I tried that. The error disappeared and the script compiled.
However, the DemoStrategy.dll file caused Forex Tester 3 (FT3) to crash during program opening.

I then removed "TechnicalFunctions" from the script, recompiled and tried to use the resulting .dll file in FT3. It worked. No crash.
Then I removed the "Begin" before the last "End." in the script, recompiled and tried to use the resulting .dll file in FT3. It again worked. No crash.

So, my conclusions are:
1. the error "Expected BEGIN but received END at line 33 (33:1)" can probably be ignored. Alternatively add the "Begin" before the last "End." to get rid of the error message. Either way the program compiles and can be read by FT3.
2. the use of the 5/17/2010 versions of "TechnicalFunctions.pas" and "IndicatorInterfaceUnit.pas" can be used in TurboDelphi to obtain a compiled .dll file. However, the .dll file with these .pas tools cause FT3 to crash.

Questions:
1. What are the newest versions of the "TechnicalFunctions.pas" and "IndicatorInterfaceUnit.pas" files?
2. Where can I get them?

Re: compile error with TurboDelphi (Expected BEGIN but received END)

Posted: Wed Oct 26, 2016 8:53 am
by FX Helper
Hello,

Please see attached files, these are the newest TechnicalFunctions.pas and IndicatorInterfaceUnit.pas files

Re: compile error with TurboDelphi (Expected BEGIN but received END)

Posted: Wed Oct 26, 2016 8:54 am
by FX Helper
I will ask our programmers to add the Technicalfunctions.pas file into the Forex Tester folder

Re: compile error with TurboDelphi (Expected BEGIN but received END)

Posted: Thu Oct 27, 2016 8:01 am
by Lonesome
Hi,

thanks for posting the files. These files were not included when I downloaded FT3 on October 4th, 2016.
I can confirm that these .pas files work with TurboDelphi and FT3. I tested with the complete codes from Lessons 2 and 3.

Regarding the "Expected BEGIN but received END at line 33 (33:1)" error. This error can be ignored. The scripts with this error compile and work in FT3.
That is the "Strategy properties" windows contain the same content as shown on the Lesson websites. I did not run the strategies.
If you don't like the error add "Begin" before the last "End." It makes no difference.