File types are not allowed as function result types.
program Produce; function OpenFile(Name: string): File; begin end; begin end.
You cannot return a file from a function.
program Solve; procedure OpenFile(Name: string; var F: File); begin end; begin end.
You can 'return' the file as a variable parameter. Alternatively, you can also allocate a file dynamically and return a pointer to it.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|