In parameters are variables that only get passed in (by value).  Out
parameters are variables that will contain a value after the function
executes, such as passing in a buffer (by reference).  In/Out parameters are
parameters that are passed in with one value, and have another when the
function is done executing (also by reference).  It's really just a
different way of returning a value from a function.

For example, an out parameter could be used to fill a buffer or to copy to
an existing buffer, allowing you to reuse a variable instead of returning a
new one.  (ex:CopyBytesToBuffer(myString, myBuffer[], 0, 255)).  This is
used a lot in older languages like C and C++.  The Win32 API makes _heavy_
use of it.  


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Nando
Sent: Friday, July 22, 2005 4:57 PM
To: [email protected]
Subject: RE: [CFCDev] Managers

Sorry if i'm being obtuse, but what's an 'in' parameter? I just went over
the to bookcase and picked up the UML book i have here, Applying UML and
Patterns, but can't find anything about an 'in' parameter. Such is life when
you're self taught. The puzzle pieces are much more scattered.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Barney Boisvert
Sent: Friday, July 22, 2005 10:06 PM
To: [email protected]
Subject: Re: [CFCDev] Managers


> I don't quite get the implication in the diagram behind the (in contact :
> Contact, in group : Group) part, ... yet.

That's saying you have two 'in' parameters name 'contact' and 'group',
and they are of type 'Contact' and type 'Group' respectively.  Here is
is in Java syntax:

public void myMethod(Contact contact, Group group)

I'd highly recommend picking up a UML book.  Not necessarily to learn
UML for everyday use, but at least to understand the concepts, because
they'll come through even in the simplest pencil'n'paper modelling
sessions.

cheers,
barneyb

On 7/22/05, Nando <[EMAIL PROTECTED]> wrote:
> This is great. Sometimes i just don't know when / whether to take the
> natural relationships "seriously" in a model, as in - Does a Newsletter
have
> Recipients (Contacts), or does a Contact have a Subscription to a
> Newsletter. It's easy to get trapped in a sort of circular thinking and
not
> have any clear pathway out of it in a case like this.
>
> So what would just one of these methods look like? How would it work?
>
> AddContactToGroup()
>
> I don't quite get the implication in the diagram behind the (in contact :
> Contact, in group : Group) part, ... yet.
>


--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]






----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]







----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to