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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: