Tomasz, the culprit was that for two symbols, WebID Field had a value of “ “ (two spaces). The previous version didn’t complain. I like the fact 7.00.1 is stricter. Thanks again.
GetFnData("DividendPayDate") DOES NOT RETURN STRING!
GetFnData("DividendPayDate") returns a NUMBER representing date-time field.
Your code is wrong. You are passing date/time number to StrToDateTime that expects STRING as input. You don't need to call StrToDateTime at all since the input data is already date/time. Plus you really need to check for Nulls. Correct usage is as follows:
divdate = GetFnData("DividendPayDate");
if( IsNull( divdate ) )
{
Title = "No Dividend Date Is Set";
}
else
{
secondsInDay = 24 * 60 * 60;
diff_in_days = DateTimeDiff( Now(5), divdate )/secondsInDay;
Title = StrFormat( "DivDate = %s, diff in days %g", DateTimeToStr(divdate ), diff_in_days );
}
Thank you for your detailed response. I wasn’t referring to that particular error in AmiBroker — it had been functioning correctly prior to version 7.0, which is why several codes required modification. No issue though, the code has now been successfully updated.
No it wasn’t functioning. The fact the error in parameters gets unnoticed doesn’t mean it is functioning. It just means it gets unnoticed and you are not aware of the formula error. Again it is an error in the formula, not in AmiBroker. AmiBroker reports formula errors. Stricter parameter checking is there for a reason, to make you aware of errors in the formula, so code can truly work correctly.
Like dictionary reports spelling errors in the text you are writing,