If ia line is preceded by // it means its a comment. So this line does
nothing in your code. It seems that the line you are talking about is C
code. Probably you are looking at converted code. The pascal way of
doing it is to use functions and not compiler macros which defines
C-style are.
There are defines though in pascal. This URL explains it in more detail:
http://www.delphibasics.co.uk/RTL.asp?Name=$Define
Delphibasics is a very nice site, use it often ;)
Darius
12 12 wrote:
Unfortunely www.freepascal.org works very bad. It fails most of search
queries falling down with messages like this:
"There was a server error processing your request. We apologize.
Take me back where I was (before the error)
Database operation "0or1row" failed (exception NSDB, "Query was not a
statement returning rows.")
............" .
I just tried to search for keyword "define".
So maybe someone can explain what's the "feature":
I try to make "video for pascal" written by Stefan Ziegenbalg work
under Lazarus.
I found it's sources contains a lot of obsolette constructions like
changing value of for-loop variable.
I correct what i can.
But i cannot understand the meaning of some sentences like below.
After "unit" before "interface section":
//define[_IOR(][,#1,#2)][_IOC(2,ord('#0'),#1,sizeof(#2));]
Before implementation in body of interface section:
{ CVideo } VIDIOCGCAP = _IOR(v,1,video_capability);
{ Get capabilities }
When try to compile compiler says:
"Compiling videodev.pas
videodev.pas(285,36) Error: Identifier not found "_IOR"
videodev.pas(285,41) Error: Identifier not found "v"."
It seems "//define" means macro, not just a comment. But IDE
interprets is as comment.
A read docs on freepascal and only found {$DEFINE} syntax for macro
and nothing about "//define".
Does somebody can explain what means
//define[_IOR(][,#1,#2)][_IOC(2,ord('#0'),#1,sizeof(#2));]
before "interface" section and how it can be interpretted as macro?
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives