[futurebasic] RE: [FB] Header translation

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 2005 : Group Archive : Group : All Groups

From: "Edwards, Waverly" <Waverly.Edwards@...>
Date: Tue, 9 Aug 2005 08:57:38 -0400
Sorry Bernie.

I just realized that I didn't really answer your questions.
That was an oversight on my part.  I read fast and didn't think.


W.
 

-----Original Message-----
From: Edwards, Waverly [mailto:Waverly.Edwards@...] 
Sent: Monday, August 08, 2005 1:53 PM
To: futurebasic@...
Subject: RE: [FB] Header translation


The star is akin to @ symbol in that it is requesting the address of the
variable.
Many times a *void can be considered a general pointer but not always,
it depends on the context.


W. 

-----Original Message-----
From: Bernie [mailto:fblist@...]
Sent: Monday, August 08, 2005 1:05 PM
To: futurebasic@...
Subject: [FB] Header translation


Let's take fn GetControlProperty() as an example.

Here's how it appears in Apple's header:

extern OSStatus
GetControlProperty(
   ControlRef   control,
   OSType       propertyCreator,
   OSType       propertyTag,
   UInt32       bufferSize,
   UInt32 *     actualSize,
   void *       propertyBuffer)


and this is how it has been translated in FB:

toolbox fn GetControlProperty(
   ControlRef c,
   OSType propertyCreator,
   OSType propertyTag,
   UInt32 bufferSize,
   UInt32 *actualSize,
   ptr *propertyBuffer ) = OSStatus


Questions:

1) What is the * (star) for in "UInt32 * actualSize"? Do we need it in
the FB translation?

2) Is it fair to say that whenever the param type appears as "void", we
can substitute "ptr" ?


TIA
Bernie

--

--