?
Solved

C type to Deplhi...

Posted on 1999-07-09
3
Medium Priority
?
157 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

719 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