compile error with TurboDelphi (Expected BEGIN but received END)

How to create strategies and indicators
Message
Author
Lonesome
Posts: 28
Joined: Fri Oct 21, 2016 9:04 am

compile error with TurboDelphi (Expected BEGIN but received END)

#1 Postby Lonesome » Tue Oct 25, 2016 8:30 am

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?
Attachments
pict_2876.jpg
pict_2876.jpg (208.41 KiB) Viewed 36324 times

Lonesome
Posts: 28
Joined: Fri Oct 21, 2016 9:04 am

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

#2 Postby Lonesome » Wed Oct 26, 2016 6:56 am

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?

FX Helper
Posts: 1477
Joined: Mon Apr 01, 2013 3:55 am

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

#3 Postby FX Helper » Wed Oct 26, 2016 8:53 am

Hello,

Please see attached files, these are the newest TechnicalFunctions.pas and IndicatorInterfaceUnit.pas files
Attachments
Files.zip
(11.21 KiB) Downloaded 948 times

FX Helper
Posts: 1477
Joined: Mon Apr 01, 2013 3:55 am

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

#4 Postby FX Helper » Wed Oct 26, 2016 8:54 am

I will ask our programmers to add the Technicalfunctions.pas file into the Forex Tester folder

Lonesome
Posts: 28
Joined: Fri Oct 21, 2016 9:04 am

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

#5 Postby Lonesome » Thu Oct 27, 2016 8:01 am

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.


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 23 guests