Very strange script's behavior

Ok, please read the script written in Basic Script under script editor of FastReport Studio 4.5:

Sub ReportOnStartReport(Sender)
dim a as integer
dim s as string

for a = 1 to 10
if a = 5 then
s = "5 Only"
a = 11
elseif a = 9 then
s = "Now is 9"
end if
next
ShowMessage (s)
End Sub


Those who knows programming, will know variable "a" will never reach to 9, because when "a" reach to 5, it will be assinged to 11 thus end the for loop. Show the "s" should contain "5 Only".

But the result is "Now is 9" ???????? Why will this happen? Is this a serious bug in FastScript? Or do I miss out something or this is the FastScript style?
And when I try to watch the variables, it pop out "Access Violation..." error message and fail to obtain the watch value.

If those were a bugs, please fix them as soon as possible, they totally affect my product's development time. And I wont think it is worth to use FastReport if I dont have the sastified solutions of this.

Thanks in advanced.


Regards,
Martin

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.