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?

Example:
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?


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to