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
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