View Single Post
  #4  
Old 02-27-2017, 02:07 PM
rojam rojam is offline
Senior Member
 
Join Date: Jun 2015
Posts: 183
Default

Your function is flawed.

A function MUST return a value.

1) if '(FldDest.DataType=ftBoolean)' evaluates FALSE, then your function never sets Bool thus FldDest.AsBoolean:=Bool; is meaningless.
2) if '(FldDest.DataType=ftBoolean)' evaluates TRUE, Bool only gets a value if one of the two if statements evaluates true. If both evaluate FALSE, then Bool doesn't get any value thus FldDest.AsBoolean:=Bool; is meaningless.

A function CANNOT have a path through it that does not return a valid value. Your function obviously has too many paths through it that leaves it returning nothing.

Last edited by rojam; 02-27-2017 at 02:15 PM.
Reply With Quote