Iwanttoownz
asked on
Replacement for FillChar function
Hey,
I need a replacement of the function FillChar in delphi or I need the original function that is in delphi.
Both are preferred..
Thanks in advance.
I need a replacement of the function FillChar in delphi or I need the original function that is in delphi.
Both are preferred..
Thanks in advance.
ASKER
Nope.. I need the code:
procedure FillChar(var X; Count: Integer; Value: Byte);
begin
...
..
..
..
....
end;
procedure FillChar(var X; Count: Integer; Value: Byte);
begin
...
..
..
..
....
end;
that code is part of delphi which is under copyright, so we cannot post it. it would be illegal.
if you do not have the version that comes with sources (professional and above) you cannot see that code.
if you do have it, jsut open system.pas and it's there. In my delphi 7 it's on line 5057.
what do you need it for? wouldn't some other fillchar procedure be good?
if you do not have the version that comes with sources (professional and above) you cannot see that code.
if you do have it, jsut open system.pas and it's there. In my delphi 7 it's on line 5057.
what do you need it for? wouldn't some other fillchar procedure be good?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
@ciuly I currently use Enterprise, has Profession given any benifits that are worth while?
enterprise is a 'better' version than Professional.
This means you have all VCL source code. Check for c:\program files\borland\?\source\Win 32\rtl\sys \system.pa s
The ? depends on the version of Delphi you are using.
In that file, you can find the sources of FillChar
This means you have all VCL source code. Check for c:\program files\borland\?\source\Win
The ? depends on the version of Delphi you are using.
In that file, you can find the sources of FillChar
>> @ciuly I currently use Enterprise, has Profession given any benifits that are worth while?
dunno. I'm on enterprise as well. I just recall (maybe incorrectly) that professional also has the VCL sources. for some reason I've been living with this information for quite a while :)
dunno. I'm on enterprise as well. I just recall (maybe incorrectly) that professional also has the VCL sources. for some reason I've been living with this information for quite a while :)
ASKER
Can anyone recode it?
*Points at my first post*
There it is?
As far as I know the real fillchar() uses rep stowsb, but mine works just the same.
Also fillchar for me in enterprise points to this in system.pas:
unit System; { Predefined constants, types, procedures, }
{ and functions (such as True, Integer, or }
{ Writeln) do not have actual declarations.}
{ Instead they are built into the compiler }
{ and are treated as if they were declared }
{ at the beginning of the System unit. }
There it is?
As far as I know the real fillchar() uses rep stowsb, but mine works just the same.
Also fillchar for me in enterprise points to this in system.pas:
unit System; { Predefined constants, types, procedures, }
{ and functions (such as True, Integer, or }
{ Writeln) do not have actual declarations.}
{ Instead they are built into the compiler }
{ and are treated as if they were declared }
{ at the beginning of the System unit. }
ASKER
Thanks ThievingSix
But I need it recoded, same function different code.
But I need it recoded, same function different code.
That is recoded? What exactly do you need?
>> Also fillchar for me in enterprise points to this in system.pas:
search for it. you will find a _fillchar proc there ;) (note the leading underscore)
search for it. you will find a _fillchar proc there ;) (note the leading underscore)
!! Your right lmfao..I knew it they used STOSB!!
Thanks XD
Thanks XD
Do you need something like StringOfChar??? but that finally calls FillChars?
http://www.montefiore.ulg.ac.be/~latour/doc/pascal_fpc/html/ref/refsu178.html
But it is more friendly.
I do not get the idea of what you really needs.
http://www.montefiore.ulg.ac.be/~latour/doc/pascal_fpc/html/ref/refsu178.html
But it is more friendly.
I do not get the idea of what you really needs.
ASKER
I need same function, but with different code.
That IS different code. The code in system.pas isn't that. I recreated it.
I don't understand why I got a B grade. If I haven't fullfiled your answer you should give the expert a chance to earn that 'A' grade.
FillChar procedure
Fills contiguous bytes with a specified value.
Unit
System
Category
character manipulation routines
Delphi syntax:
procedure FillChar(var X; Count: Integer; Value: Byte);
Description
In Delphi, FillChar fills Count contiguous bytes (referenced by X) with the value specified by Value (Value can be type Byte or Char).
Warning: This function does not perform any range checking.
is this not what you are looking for?