Jun 18, 2010 at 4:57 PM
Edited Jun 18, 2010 at 5:00 PM
In CPP one can return more than one element of data from a routine. This is accomplished by passing an address as one of the routine arguments. Such cannot be done in CSHARP. In the original CPP standards, a routine returns up to three items: an upgraded version of the associated data structure, data resulting from a particular operation, and the status/error value. There is no clean way of doing this in CSHARP. The solution of this portability challenge can be found by adopting a "driver philosophy". There will be three categories of routines; routines that update the associated data structure, routines that produce data without updating the associated data structure, and routines that return the processing or test status without updating the associated data base. Errors can be handled by CSHARP's exception handling capability. These three categories of routine can be easily implemented in CPP and may expand strict portability to the development of drivers.