?
Solved

C type to Deplhi...

Posted on 1999-07-09
3
Medium Priority
?
158 Views
Last Modified: 2010-04-06
Hi...

Has anyone an idea how to make a Pascal compatible type out of this?

unsigned short  ColorCode     (int r, int g, int b);

Jonny...
0
Comment
Question by:jonnyfive
  • 2
3 Comments
 
LVL 1

Expert Comment

by:rpo
ID: 1387434
The type for this is :

function ColorCode ( r,g,b : Smallint ) : Word;

This declaration is equal to given C declaration and is correct for Delphi 3 (and probably 4) if int in C (the version this declaration designed for) is 16bit integer (if it is 32bit replace SmallInt with Integer).
Here Word is unsigned 16bit integer and Smallint is signed 16bit integer.

Roman.
0
 

Author Comment

by:jonnyfive
ID: 1387435
Thanks :-) I just overlooked that this is a function not a variable... anyway... just answer this question and the points are yours :-)

0
 
LVL 1

Accepted Solution

by:
rpo earned 60 total points
ID: 1387436
Thanks.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
Suggested Courses
Course of the Month3 days, 21 hours left to enroll

599 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question