can i not use OBJEPC to do this,also work??
plz give me some suggestion?
I am not sure what you are asking for exactly but, i assume you do _not_ want to use mode OBJFPC.
In that case remove the {$mode OBJFPC} directive. If compiling in default FPC mode you can also remove the {$H+} directive.
You would also need to replace all references to the variable "Result" with the name of the function (in case of my example, replace with "RandString" (without the quotes)).