[fpc-pascal] function returning a record vs paramaters
fpc505 at z505.com
Sat Jul 9 20:05:37 CEST 2005
When a function requires that more than one value must be returned, what are the
advantages of returning one of these values in a paramater versus using a record
that contains all the data?
A function needs to return an integer, string, and boolean. Why not just return
a record containing an integer, string, and boolean?
Advantages of records:
Surely records are much more legible code design than parameters.
Disadvantages of records:
Are paramaters more portable than records, say if you were writing a library
(.so or .dll, etc.)?
Can a c++ or c program deal with a pascal record?
How about speed and performance?
More information about the fpc-pascal