#### Archived

This topic is now archived and is closed to further replies.

# Some hints I kwon and one question

This topic is 5910 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

##### Share on other sites
GetTickCount is very innacurate as well

##### Share on other sites
Using the high performance counter to do the tests would provide more accurate results, but the results from GetTickCount are a reasonable guide.

Delphi does not support C-style macros. Inline functions disappeared a few versions back.

You could simulate macros by using the $INC compiler directive, but this would require the macro be in a file all by itself and the code using the macro would need to use the same variable names as the macro. Example: In a text file called AddInt.macro, add the following line z := x + y; and then somewhere in your code procedure SomeProc(x, y: Integer): Integer;var z: Integer;begin {$INC AddInt.macro}  Result := z;end;

This simulates a macro, but is not something that I would use in all my applications.

Steve ''Sly'' Williams  Monkey Wrangler  Krome Studios

##### Share on other sites
First I kwon the GetTickCount is not very good, but is enoght... becouse when I did the tests I did something like this:

i := 12 ;
temp := GetTickCount ;

for t := 1 to 10000000 do
if (i=1) or (i=2) or (i=10) or (i=12) then i := 12 ;

temp := Gettickcount - temp ;

So becouse the "FOR" is very long will not affect that.

And second... Thank you for the "macros"!

c ya
cocorini